Matrix with numbers start from top left and move to bottom left. You can move left or down. Maximize the total sum on your path op left and move to bottom left.
Software Engineer 2 Interview Questions
665,793 software engineer 2 interview questions shared by candidates
Input is a string like "AAAAABBCCAA" and it should print "5A2B2C2A". 5 being the continuous number of occurance for character 'A'. Same is with other characters also.
what is 2^4
1. Given an array that contains duplicates (except for one value), find the one value that does not have a duplicate in that array. Explain the complexity of your algorithm. So in the array: A = [2, 3, 4, 5, 2, 3, 4] your algorithm should return 5 since that's the value that does not have a duplicate. 2. Explain the process that happens when you type your username and hit submit on a website (HTTP, server/client communication, etc...)
Last interviews question for which I got 10 mins was a tricky one. He wanted me to implement Google's "Did you mean" logic.
Given an array of pairs of numbers, simplify the numbers. The pairs represent ranges, and the result is a simplified version of these pairs. So [1,5],[3,7] should result in [1,7].
Interview question like that Q: 01 Given: 11. public static void parse(String str) { 12. try { 13. float f = Float.parseFloat(str); 14. } catch (NumberFormatException nfe) { 15. f = 0; 16. } finally { 17. System.out.println(f); 18. } 19. } 20. public static void main(String[] args) { 21. parse("invalid"); 22. } What is the result? A. 0.0 B. Compilation fails. C. A ParseException is thrown by the parse method at runtime. D. A NumberFormatException is thrown by the parse method at runtime. Answer: B
More of logical questions.
Write a function called eval, which takes a string and returns a boolean. This string is allowed 6 different characters: 0, 1, &, |, (, and ). Eval should evaluate the string as a boolean expression, where 0 is false, 1 is true, & is an and, and | is an or. An example string might look like "(0 | (1 | 0)) & (1 & ((1 | 0) & 0))"
Given a list of people's names, organize a beer exchange such that each person is randomly assigned someone else to give a beer to, and someone to receive a beer from. Caveat: The person cannot receive a beer from the same person to whom they are gifting one.
Viewing 1681 - 1690 interview questions