Sr Software Developer Interview Questions

7,038 sr software developer interview questions shared by candidates

What is SOLID principles? How does get method of HashMap works in Java? What is reflection? Give an example of functionality that can only be implemented using reflection. Are you familiar with The Twelve-Factor App principles? How do you prevent SQL Injection in Java Code? Difference between process and thread? Calculate height of BST using recursion Indian mathematician D.R. Kaprekar observed a very interesting property of number 6174. If you take any four digit number (let's say 3281) and arrange its digits in descending order (8321) and ascending order (1238) and then subtract the smaller number from the larger number -- and if you repeat that process, you will reach number 6174. For example: 3281: 8321 - 1238 = 7083; 8730 - 0378 = 8352; 8532 - 2358 = 6174 Number 6174 - when you do this process, will result into 6174 itself. Exception to this is a four digit number with all same digits (such as 1111, 2222, 3333 etc.), as that will result into 0 in the very first step. Your task is to write a function that finds out that for all four digit numbers (from 1000 to 9999), how many steps does it take to reach the magic number (6174). The function should also find out if it can't reach the number 6174 for whatever reason.
avatar

Senior Software Developer

Interviewed at ZeMoSo

4
Jun 7, 2023

What is SOLID principles? How does get method of HashMap works in Java? What is reflection? Give an example of functionality that can only be implemented using reflection. Are you familiar with The Twelve-Factor App principles? How do you prevent SQL Injection in Java Code? Difference between process and thread? Calculate height of BST using recursion Indian mathematician D.R. Kaprekar observed a very interesting property of number 6174. If you take any four digit number (let's say 3281) and arrange its digits in descending order (8321) and ascending order (1238) and then subtract the smaller number from the larger number -- and if you repeat that process, you will reach number 6174. For example: 3281: 8321 - 1238 = 7083; 8730 - 0378 = 8352; 8532 - 2358 = 6174 Number 6174 - when you do this process, will result into 6174 itself. Exception to this is a four digit number with all same digits (such as 1111, 2222, 3333 etc.), as that will result into 0 in the very first step. Your task is to write a function that finds out that for all four digit numbers (from 1000 to 9999), how many steps does it take to reach the magic number (6174). The function should also find out if it can't reach the number 6174 for whatever reason.

Viewing 5291 - 5300 interview questions

Glassdoor has 7,038 interview questions and reports from Sr software developer interviews. Prepare for your interview. Get hired. Love your job.