Output a single linked list in reverse, in linear time and constant space, and recursively
Developer Intern Interview Questions
12,166 developer intern interview questions shared by candidates
Given n+1 buckets with n of them with ball inside and move(a,b) function, that moves ball from bucket a to bucket b. Each ball has a different number from [1,n] on it. Move balls, so each bucket has a ball with matching number in it.
Given 2 arrays sorted in ascending orders (a[n] and b[n*2]) with the second half of array a[] being empty, create a function that merges both arrays into a single sorted array.
First I was asked a few basic design questions, like how I would design an online chat system with separate room. Then I was asked why I've chosen some of of the technologies that I have worked with.I was asked a standard question about manipulating an array. The input array was sorted integers, and I was asked how to square all the elements and keep it sorted.
Given a root to a binary tree where each node holds an integer. Write a method that returns the sum of all the integers in the tree.
Write a function in Java that will take a sorted array of ints, possibly with duplicates, and compact the array removing all the duplicate numbers. That is, if the contains the numbers - 1, 3, 7, 7, 8, 9, 9, 9, 10, then when the function returns, the contents should be - 1, 3, 7, 8, 9, 10. Be sure your answer is as efficient as possible. Describe the efficiency of your algorithm using big O notation.
Suppose there is a rectangular map where you can only travel up or right to go from a start location in the bottom left corner to the top right corner, and each move is discrete. Write a program that prints all possible solutions to get from the start to finish.
Write a function to determine if a bin tree is a valid BST. I wrote a fully working solution in 3-5 minutes. It was also the most optimal but maybe because she needed to kill time, she asked me to rewrite it in what she thought was optimal (her reasoning didn't make much sense). Then she asked me for time and space requirements of the solutions. I said O(n) for both which is correct but she insisted that the space requirement was O(logn) which is wrong.
Print a binary tree level by level
phone numbers: provided a phone number (654-876-0987), return all possible strings that the phone number could represent if 2 -> {A, B, C}, 3 -> {D, E, F}, and so on common substring: find the biggest common substring in 2 strings, "abcdef" "gbcdh" would return "bcd"
Viewing 31 - 40 interview questions