Data Structures Interview Questions
- 0of 0 votes
AnswersSuggest a DS for web server to store history of visited pages. The server must maintain data for last n days. It must show the most visited pages of the current day first and then the most visited pages of next day and so on.
- Rahul June 08, 2011| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm Data Structures - 0of 0 votes
AnswersHow to find the median from a randomly generated 1 billion integers?
- seeksree June 04, 2011
Hint: To think of using specific data structure or approach so that the entire integer need not be sorted (to identity integer such that half the integers fall to the left and other half fall to the right of it)| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Data Structures - 0of 0 votes
AnswersDesign a system to calculate the number of unique words in a file..
- ss June 01, 2011
1) What if the file is huge ? (i.e cannot fit in the main memory)
2) Assuming that you have more than one computers available, how can you distribute the problem ?| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Data Structures - 0of 0 votes
AnswersThere's an array in sorted order. But it has been rotated by N positions. The value of N can be anything from 0, and is unknown to us. In this scenario, how will you find a number X efficiently. Give a solution that works for O(n). I suggested for 2 searches of log n. But interviewer wanted more better solution.
- sanjeevsince90 May 23, 2011| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersConvert a Binary Search Tree into a sorted Linked List. Head of the linked list has to be returned. The node structure used for BST contains an extra pointer *next which is initially pointing to null. The whole process has to happen in space. One or two variables are allowed tho.
- sanjeevsince90 May 23, 2011| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersGiven a postfix expression convert into infix expression.
- kumarasvn May 22, 2011| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersHow to serialize/de-serialize a binary tree?
- henry May 19, 2011| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Data Structures - 0of 0 votes
AnswersAsked me about Has tables and complexities of various operations on it.
- naren.katneni April 18, 2011| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
Answersprinting, deleting linked list and some more questions on linked list, accesing time of binary search
- Bhari April 18, 2011| Report Duplicate | Flag | PURGE
Samsung Developer Program Engineer Data Structures - 0of 0 votes
AnswersIf I have a string like
- Anonymous April 03, 2011
www.bing.com/abc/asd/asdffg/../asdasd/.../asda/../.../
this is a example ,
if you have /../ then dont remove the letters and / before , just remove /../
www.bing.com/abc/asd/asdffg/asdasd/.../asda/.../
Another example
if you have /.../ then remove the letters before and itself
www.bing.com/abc/asd/asdffg/../../| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Data Structures - 0of 0 votes
AnswersIn Binary tree .. from the in-order traversal and pre-order travrsal .. construct the tree
- Anonymous April 01, 2011| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Data Structures - 0of 0 votes
AnswersWhen would you use a hash table? Specific situations were asked
- NVIDIA reject March 15, 2011| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C Data Structures General Questions and Comments - 0of 0 votes
Answersdesign a boolean functions to check whether two strings are anagram or not in O(n)
- Dude March 04, 2011| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersDesign a class to serialize / deserialze a graph.
- leeym March 04, 2011| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Data Structures - 0of 0 votes
Answers(2nd phone screen)
- troy February 28, 2011
write a function isBST() that should tell if a binary tree is BST or not| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Data Structures - 0of 0 votes
Answers(2nd phone screen)
- troy February 28, 2011
reverse pair of elements in a linked list.
eg. abcdef shouldbecome badcfe| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Data Structures - 0of 0 votes
AnswersImplement Queue using Stack. Help to get a code with resolving complexity.
- Shiva February 26, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Data Structures - 0of 0 votes
Answerswhat data structure does the std::set use? How would you insert items to a red-black tree?
- Anonymous February 22, 2011| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Data Structures - 0of 0 votes
Answersquestions about hashtable. what affects lookup speed?
- Anonymous February 22, 2011| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Data Structures - 0of 0 votes
AnswersGiven a BST in a language where memory must be handled manually, how do you completely remove BST from memory? Recursion is not allowed. Was later told that desired solution had O(N) time and O(1) space.
- Anonymous February 16, 2011| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
Answers<round 3>
- siva.sai.2020 February 08, 2011
9. Array A[n] it contains numbers from 1 to n but 1 number repeated. Find out missing number.
----------------------
I have not answered this question and manager not happy with my performance. THIS THE END OF THE BATTLE.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
Answers<round3 >
- siva.sai.2020 February 08, 2011
8.He asked me many Hashing questions.
Sub questions
1. What is hashing ?
2. you can write your own hash methods or you can use existing Hash methods in STL C++.
which one you prefer ? why ?
3. Write a Generic hash function & hash table , which should support all data types INT, FLOAT, STRINGS, and OBJECTS .| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
Answers<round 2>
- siva.sai.2020 February 08, 2011
6. Quadrant contains N points and all are + ve points ( I mean both (X,Y) are +ve values).
sub questions:
1. How you will store( or Data structure) N points to make look up( or search) easy.
2. Find out closest point (Pj) for a entered point (Pi).
Note: He asked me time efficient solution.
User can add extra M points later point of time. So your solution should be Scalable.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures