Software Developer Interview Questions

709,974 software developer interview questions shared by candidates

In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesn’t know anyone in the party. We can only ask questions like “does A know B? “. Find the stranger (celebrity) in minimum number of questions.
avatar

Software Development Engineer

Interviewed at Amazon

3.5
Aug 3, 2016

In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesn’t know anyone in the party. We can only ask questions like “does A know B? “. Find the stranger (celebrity) in minimum number of questions.

Come out with an algorithm for getting the column number provided the column name in a excel sheet and vice versa. Excel has a naming convention of A,B..Z,AA,AB,AC..ZZ,AAA... This had to be converted to the column numbers. A will be 1 and AA will 27.. Also the algorithm to find the name provided column number.
avatar

Software Engineer

Interviewed at Google

4.4
Mar 19, 2009

Come out with an algorithm for getting the column number provided the column name in a excel sheet and vice versa. Excel has a naming convention of A,B..Z,AA,AB,AC..ZZ,AAA... This had to be converted to the column numbers. A will be 1 and AA will 27.. Also the algorithm to find the name provided column number.

Given a string with only ')' and '(' find if the string is complete or not. If the string is complete means that each open paranthesis should have a corresponding closed one. Eg: String s= "((()))()"- Complete String String s1=")()()()())))(()()()((" - Incomplete String
avatar

Software Developer

Interviewed at Google

4.4
Feb 24, 2012

Given a string with only ')' and '(' find if the string is complete or not. If the string is complete means that each open paranthesis should have a corresponding closed one. Eg: String s= "((()))()"- Complete String String s1=")()()()())))(()()()((" - Incomplete String

Implement a function string balanceParanthesis(string s); which given a string s consisting of some parenthesis returns a string s1 in which parenthesis are balanced and differences between s and s1 are minimum. Eg - "(ab(xy)u)2)" -> "(ab(xy)u)2" ")))(((" -> ""
avatar

Software Engineer

Interviewed at Meta

3.6
Aug 9, 2011

Implement a function string balanceParanthesis(string s); which given a string s consisting of some parenthesis returns a string s1 in which parenthesis are balanced and differences between s and s1 are minimum. Eg - "(ab(xy)u)2)" -> "(ab(xy)u)2" ")))(((" -> ""

class A { public A() { foo(); } public void foo() { System.out.println("Class A"); } } class B extends A { public B(){} public void foo() { System.out.println("Class B"); } } class main { public static void main(String[] args) { A a = new B(); } } What does it print? Class A or Class B?
avatar

Software Engineer

Interviewed at Bloomberg

4
Oct 25, 2012

class A { public A() { foo(); } public void foo() { System.out.println("Class A"); } } class B extends A { public B(){} public void foo() { System.out.println("Class B"); } } class main { public static void main(String[] args) { A a = new B(); } } What does it print? Class A or Class B?

Viewing 91 - 100 interview questions

Glassdoor has 709,974 interview questions and reports from Software developer interviews. Prepare for your interview. Get hired. Love your job.