Interview DesK

Click Here to share your interview experience!
< LG Software BangloreAlcatel Lucent >

Amazon

(Software Developer)

1.Reverse a binary search tree in such a manner so that parent child relationship maintained and left child become right child and vice versa.


2. Find the minimum and maximum element in stack in O(1).

3. given an array find the next minimum element in array for each element. for example if give array is 4,2,1,5,3 resultant array would be 2,1,-1,3,-1.

4. Given two string A and B . remove each character from string A which occur in B. if a occur 2 times in B remove 2 a from A.
5. find the median of input stream in minimum time complexcity.(Online algo)
6. make copy of a linked list which has two pointer one point to next node and other one point to arbitrary node in linked list.

7. if u will access data from a social networking site such as Facebook . suggest some method to remove latency to access data.

8.Given a cordinate system in which there are n points. you have to calculate the m minimum points from some origin point. Suggest a data structure for this.
9.some question on hash data structure.

10. Given a linked list and some no n . you have to reverse the node of linked list in pair of n. consider all test cases for this.

11. Given a array where the difference between two consecutive element is one. Given a no find that no in array in minimum time complexity.

12. how to check singly linked list is palindrome or not.

13. Given a preorder of binary tree such that in tree each node have either 0 or no childern. and each leaf node is represented by N. construct a tree from this.

14. you have given a string of multiline. you have to print the maximum occupancy word in each line and if there is some capital letter in each line then print each capital letter occupancy and then small letter occupancy. ex given string is

Abccddegdkshsl
aghdoiuuaknclna
AHBalowknxxbb
ajhduiaklaLLL
your o/p should be :
A -1, d-3
a-3
A-1,H-1,B-1,x-2,b-2
L-3,a-3

15. one question related to password matching you have given some precondition for password then user input some password then you will validate the password with each condition if any one condition failed then you have to show password Rejected.




HAVE YOUR SAY...

Click on 'Like' to receive all Job & Interview updates via Facebook.