You are on page 1of 1

Amazon Questions: Tech Round 1 : 1 Implement Trie. 2 Theory questions on virtual memory, page table 3 What is hashing?

4 Name some hashing techniques and explain how they work 5 What is linear probing and a simple problem on linear probing 6 Convert BST into a linked list and write code for it 7 write code to find the lowest common ancestor of two given nodes [ assumption : given nodes are in binary tree] in a binary tree 8 Given two nodes A and B in a binary tree, print the path from node A to node B 9 What do you like about amazon? Tech Round 2 : 1 Given an increasing sequence of consecutive numbers in a string variable, find the missing number in the sequence Example : "23242527282930" -- > missing number is 26 "9899100102103" -- > missing number is 101 For this question, i was asked to give just approach to solve the problem. 2 Given a BST , replace every node with the sum of all the nodes whose value is greater than the value of the current node. 3 Given an unsorted array find the median of the array. 4 Given an unsorted array and the median of the array, find the K closest numbers to the given median 5 Given a matrix A of size M*N, it is filled with 1's and 0's randomly. When the user clicks on a particular cell, convert all the cells which are connected to it to the given color. The following example should make it clear: When a user clicks on B1 and the color to which it has to be converted is R, then fig1 should be converted to fig2. Fig1 Fig2

6 Given a character array of size M*N and a query string. A string can be found either vertically, horizontally or in a stair case fashion. Now, the task is to find whether the given query string is in the array or not.

You might also like