Data Structures Interview Questions
- 0of 0 votes
AnswersImplement two stacks in a single array. Please note that you should not report stack full until all the elements are full.
- Nani October 09, 2010| Report Duplicate | Flag | PURGE
Microsoft Data Structures - 0of 0 votes
AnswersGiven a shuffle of cards what data structure would you use ? Also tell how would you carry out the suffle operation on that deck such that it is ensured that each card gets shuffled.
- cinderella September 25, 2010| Report Duplicate | Flag | PURGE
National Instruments Software Engineer / Developer Algorithm Data Structures - 0of 0 votes
AnswersGiven a circular link list.
- Code Eater September 23, 2010
struct llsit{
int data;
struct llist *nextnode;
};
Node contains alternate +ve and -ve value . Now return the node from where if we keep on adding the values of next node we will always have a +ve sum untill we come to same node again.| Report Duplicate | Flag | PURGE
Data Structures - 1of 1 vote
AnswersPropose a data structure that would store numbers, without any knowledge about them, and allow to perform the operations: insert, get median, as efficiently as possible
- Soupnazi September 10, 2010
b. same as before, only this time the numbers are from a group V, which is |V|<<n| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersTell me how these DS stored in memory?
- ritz September 07, 2010
Hashtables, Dictionary, Trees, Arrays, LinkLists| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Data Structures - 0of 0 votes
AnswersDo in order traversal of tree.
- dimarzio August 30, 2010| Report Duplicate | Flag | PURGE
Real Networks Software Engineer / Developer Data Structures - 0of 0 votes
AnswersPrint a tree level by level.
- dimarzio August 30, 2010| Report Duplicate | Flag | PURGE
Real Networks Software Engineer / Developer Data Structures - 0of 0 votes
AnswersGiven a pre-order and in-order sequence , construct a bst out of it..
- Anonymous August 23, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersReverse a doubly linkedlist
- surath August 23, 2010| Report Duplicate | Flag | PURGE
Adobe Data Structures - 0of 0 votes
AnswersCheck whether the Binary tree is BST or not
- surath August 23, 2010| Report Duplicate | Flag | PURGE
Adobe Data Structures - 0of 0 votes
Answersyou have given a node of a tree. that node is defined as below:
- Neetu August 12, 2010
node(
int value,
node left;
node right;
node grandparent)
at the starting the grand parent node is null in the tree. you have to assign the grandparent node for all the nodes in the tree.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Data Structures - 0of 0 votes
AnswersDesign a backend for a Chess Application
- Anonymous August 08, 2010| Report Duplicate | Flag | PURGE
Highbridge Capital Front-end Software Engineer Data Structures Experience - 0of 0 votes
AnswersHow would you explain OOPs to a 10 years old child?
- Prasin August 06, 2010| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Data Structures - 0of 0 votes
Answergiven a complete binary tree (either a node is a leaf node or has two children)
- Anonymous August 03, 2010
every leaf node has value 0 or 1.
every internal node has value as the AND gate or OR gate.
you are given with the tree and a value V.
you have to output the minimum number of flips (AND to OR or OR to AND) if the evaluated value is not equal to V, if it is equal return 0, if not possible return -1.
you can just change the value of internal nodes i.e can make and to or , or to and to get the desired output
give the minimum number of flips required to get the desired output.| Report Duplicate | Flag | PURGE
Directi Software Engineer / Developer Data Structures - 0of 0 votes
AnswerDesign classes for Casino Card games. Assuming each game uses all 52 cards. Things to take into consideration: 1 to Multiple decks, shuffling and dealing.
- doc.dominic July 31, 2010
How would you take care dealing when you are running low on available cards in a game that's not continuous shuffling?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersB-Trees
- Siva July 15, 2010
- Their Structure
- Search Complexity| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Data Structures - 0of 0 votes
AnswersGiven a pointer to the node, the node has one data part and two address pointers of its own type,
- erappy July 12, 2010
If the node represent a doubly linked list convert it to B-Tree and vice versa.
Write test cases to check the system| Report Duplicate | Flag | PURGE
Microsoft Data Structures - 0of 0 votes
AnswersDesign the data structure to provide the mathematical operations +, - ,/ , * etc for the very very large numbers.
- erappy July 12, 2010
also implement the + function for two such very very large numbers ...say numbers with 1 Million digits.| Report Duplicate | Flag | PURGE
Microsoft Data Structures - 0of 0 votes
AnswersSuppose you a have function which returns a word char* GetWord() from a document. Write a data structure which holds the words in the most efficient way. If the words are repeated, find the number of repeated words.
- Rahul July 10, 2010
a)What data structure you used?
b) What algorithm you implemented?
c) What is the level of the algorithm.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Data Structures - 0of 0 votes
Answersgive an example of an application a binary tree is used for
- Anonymous July 08, 2010| Report Duplicate | Flag | PURGE
FactSet Research Systems, Inc Software Engineer / Developer Data Structures - 0of 0 votes
Answerswhat s the name of the doubly linked list with no data field.............
- :-)gr08itz July 05, 2010| Report Duplicate | Flag | PURGE
Data Structures - 0of 0 votes
AnswersA graph is given. You need to design a data structure with minimum space complexity such that it does the follows
- Anonymous July 03, 2010
--> Finds whether nodes u and v have a path in between them in O(1) time.
--> Finds whether there is a path of length k between u and v in O(k) time.
The same data structure to be used for both the purposes.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
Answers[1] Design a layer in front of a system which cache the last n requests and the responses to them from the system.
- Appy June 29, 2010
what data structure would you use to implement the cache in the later to support following operations.
[a] When a request comes look it up in the cache and if it hits then return the response from here and do not pass the request to the system
[b] If the request is not found in the cache then pass it on to the system
[c] Since cache can only store the last n requests, Insert the n+1th request in the cache and delete one of the older requests from the cache
The objective is to achieve all the three operations in O(1).| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm Data Structures - 0of 0 votes
AnswerWhat Data Structure will you use to implement a garbage collection engine?
- Loony June 28, 2010| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Data Structures - 0of 0 votes
AnswersHow would you Implement an LRU Cache?
- Loony June 28, 2010| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Data Structures - 0of 0 votes
AnswersGiven a large file containing records(name,variable lenght address).Records are already sorted in alphabetical order.Give a DS to implement efficient adding /Deleting /Searching of the records.Suggested Trie .Gave 15min time to implement it
- Anonymous June 11, 2010| Report Duplicate | Flag | PURGE
Motorola Software Engineer / Developer Data Structures - 0of 0 votes
AnswersGiven a binary tree , find out if the tree can be folded or not ?
Eg : tree (a) can be folded, but (b) cannot be folded
(a)10(Root) 7(L) 15(R) 9(R) 11(L)
(b)
- champion June 06, 2010
10(Root)
7(L) 15(R)
5(L) 11(L)| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersGiven any Binary tree find lowest common ancestor.
- Guest May 30, 2010
Note: Binary tree , not BST| Report Duplicate | Flag | PURGE
Data Structures