Consider a stack of N number of cards which are piled up and in facing down. Each card has a unique number from the range 1 to N. The card is stacked in such a way that it exhibits the following behavior: Take the first card and put it under the stack without revealing. Now the next card on the top will have the number 1 on it. Next take 2 cards one after the other and put is under the stack without revealing. Yes you guessed it right - the next card on the top will reveal a value of 2. This goes on. Eg. for such a series : 9,1,8,5,2,4,7,6,3,10 [for N=10] Write a program to generate such a series for a given N number of cards so that this behavior can be exercised.
Developer It Applications Interview Questions
717,329 developer it applications interview questions shared by candidates
Write a recursive function to determine prime number
How to remove a node from a singly-linked list when only given the pointer to the node
Find max k elements among mostly sorted list.
Was asked how I would implement division without using division or mod operators. The answer should return in the form quotient r remainder.
Given 2 numbers x and y, check if x is an integer power of y. For instance, x = 8, y = 2 would return true and x = 10 and y = 2 would return false since the first one is an integer power but the second isn't.
How to reverse a number, e.g. 1234.
Given heads of two linked lists. Find if the two linked lists intersect. Solution should not use extra memory.
Print a singly-linked list backwards, in constant space and linear time.
Given nested arrays, write an enumerator class such that next() returns the elements in sequential order, e.g.: [1,[4,3],6,[5,[1,0]]] -> 1, 4, 3, 6, 5, 1, 0 also implement allObjects for this class
Viewing 251 - 260 interview questions