Find the dominator in an array.
Developer Interview Questions
269,104 developer interview questions shared by candidates
Given a list 1,0,3,5,0,0,34,5,0,36 push all the zeroes to the end. Develop an in-place algorithm
Implement a method 'find' that will find the starting index (zero based) where the second list occurs as a sub-list in the first list. It should return -1 if the sub-list cannot be found. Arguments are always given, not empty. Sample Input 1 list1 = (1, 2, 3) list2 = (2, 3) Sample Output 1 1 Explanation As second list (2, 3) is sub-list in first list (1, 2, 3) at index 1 Sample Input 2 list1 = (1, 2, 3) list2 = (3, 2) Sample Output 2 -1
given numbers 1 4 2 0 2 0, move all zeros to beginning using minimum sorting technique
Implement the MyStack. (A lot of questions about multi-threading) @protocol Stack -(void)pushObject:(nonnull id)obj; -(nonnull id)popObjext; @property(nonatomic,assign)NSInteger count; @end @interface MyStack : NSObject <Stack> @end @implementation MyStack @end
Given a text file containing the text for Hamlet (/usr/share/file.txt), return the top 5 most frequent words with count.
String,String buffer,String builder difference. Can u write your own immutable class n how? hashmap implementation and hashcode(),equals() method he asked me to write 2 logical testing programs with reduced complexity( 0,1,1,2,4,5,3,3,1,0,1 traverse once only n get the duplicate number's along with the count). printing pascal triangle duplicate letter from a string with less complexity reversing words of string individually(this is a tree---o/p: siht si a eert)
Define Yourself
There are 4 people who want to cross a bridge. They each take 1, 2, 5 and 8 minutes. Only 2 people can cross at a time and they take as long as the slowest person. What is the fastest time you can get everyone across? Then I was asked to write the mathematical equation to determine the trade-off point between each of the 2 approaches to solving this.
(this is a little easier to explain if it's drawn out, but I'll try my best to do it here) Given some integer N = 2^k which represents an NxN matrix, write a function that fills the matrix with 'L' shapes, such that the entire matrix is filled except for 1 empty space. For example, a 2x2 matrix would have 3 spaces filled with one of the corners empty. And a 4x4 matrix would have the entire outer row of spaces filled, with the center 4 filled the same way the 2x2 matrix is filled.
Viewing 371 - 380 interview questions