You are given an array of numbers. You need to print the length of the maximum continuous sequence that you encounter. For example if input is [3,8,10,1,9,6,5,7,2 ], the continuous sequences are{1,2,3} and {5,6,7,8,9,10} the latter is the longest one so the answer becomes 6. O(n) solution was asked for, assuming you have a hash map which supports O(1) insertion and fetching operations
Software Developer Ii Interview Questions
26,048 software developer ii interview questions shared by candidates
Find k largest/smallest number in a series of numbers. What data-structures will you use? Code it on white board.
1. Test Case Enumeration: Write test cases for taxi booking application for Ola or Uber. You are expected to write testcases covering different types of functional and non-functional testing areas 2. Problem Solving: Find the first occurance of a given number from the series which has the difference between the adjacent elements as 1. For Example {1, 0, -1,-2,-1,0,1,2,3} Note: Do not use Linear Search 3. Test Data Generation Write the test data for the function: int getSmallestIntegerPosition(int[] A) This method accepts as input integer array that is already sorted and rotated "n" number of items where n is less than the size of the array For Example: The test data can be {4,5,6,1} This was derived from {1, 4, 5,6} afer sorting and rotating the array for 3 times And output of the function returns the index of integer that has the smallest value Eg: {4,5,6,1}: the smallest value is 1 and its index is 3 Note: This method searches for the element and derives the position with an order of O(log(n)) 4. Debugging While using skype or google hangout application, you are not able to do a video chat, describe how you debug the problem considering different aspects of functional and non-functional testing 5. Scripting Find the nth consecutive occurence of a character in a given string. For example for the given input string of "Amazon is a great company as it haas AtoooZzz" and the output should be "o" 6. Consider a string "Hello Good Morning" it should print the sentence in reverse order output should be "Morning Good Hello" 7. Check two strings are anagram 8. Merge two dimesional Array Consider array1 ={{10, 15}, {30, 50}} array2 ={{20,40}, {5, 10}} Merged array should be sandwitched (array 1 should be sandwitched with array 2) also while merging array if value range is less than the previously added value then that value should not be added to the merged array Output should be {10, 20, 30, 40, 50} --> 15, 5 and 10 should not be added 9. Print middle character of a string. If middle value has even then print 2 characters Eg: Amazon -->print az 10. Search an element in array without using linear search technique 11. Write test cases for Amazon Prime functionality 12. Testcases enumeration and data preperation for Whatsapp messenger
None of the questions were unexpected, at least for any candidate applying for this job. I definitely felt I could have answered few questions better.
Recruiters will prepare you with areas of questioning for the team you are interviewing for.
You have two linked lists that merge at some node. The lists could be billions of nodes long. Find the node where the lists merge in the most optimal time while using a low amount of memory.
what is mean by dairy product
You have 2 jars and 50 black beads and 50 white beads. How many would you put of each color in each jar so that if a bead was randomly selected from both jars, you had the greatest chance they would match? You have to put all of the beads in the jars.
Jim has 42 cents and has 8 coins, and Jack has 56 cents and has 6 coins. Which has more nickels than the other?
General Questions about leadership principle, 3 coding questions and 1 system design question
Viewing 11 - 20 interview questions