Data Structures Interview Questions
- 1of 1 vote
AnswersWe have n number of sorted array for fixed length.
- Harsh123 November 04, 2012 in India for Kindle
Now we have to merge these and need to save finaly result array into given array.
Note- we can't use extra space except the given array.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Arrays Data Structures Sorting - 0of 0 votes
AnswersClass A, B and C all cout their own names in their constructor. C is B’s subclass while it has an instance of A as its private member. When a C object is instantiated, what will the order of printed letters?
- A November 03, 2012 in India| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Data Structures - 0of 0 votes
AnswersC++ class animal has virtual method render which prints “Animal” while its subclass Tiger has virtual method render which prints “Tiger”. Tiger kitty;; Animal * beast = &kitty; what is the outcome of beast->render()?
- A November 03, 2012 in India| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Data Structures - 0of 0 votes
AnswersI will try to state the question. We all know mobile phone's keypad where "2" is mapped to ABC, "3" to DEF and so on. Given any sequence of integers, find all the (matching) combinations in your phone book.
- eyeonu.imtiyaz November 01, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersHow to implement stack using queue
- nishant October 31, 2012 in India| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer Data Structures - 0of 0 votes
AnswersRemove the duplicates in a linked list
- beginner October 31, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer Data Structures - 0of 0 votes
AnswersOnline Test: Find the least common ancestor for any two given nodes in a Binary search tree
- beginner October 31, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer Data Structures - 0of 0 votes
AnswersImplement a stack using two queues (no coding necessary)
- soconfusedgrad October 31, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersCheck if a tree is a binary search tree
- soconfusedgrad October 31, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersGiven a matrix of 0's and 1's find the number of groups of 1's in the matrix.
- smdmustaffa October 30, 2012 in United States
A group of 1's can be formed if a 1 is present either vertically or horizontally to the adjacent 1 and not diagonally.
1 0 0 0
1 1 0 0
0 0 1 1
0 0 1 1
The above matrix has two groups of 1's while the one shown here has only one group
1 1 0 0
1 1 1 0
1 1 0 0
No restrictions on space complexity was given but the interviewer did mention that the time complexity should be efficient and that it should work for extremely large matrix's as well.| Report Duplicate | Flag | PURGE
Software Engineer / Developer Algorithm Data Structures Java Matrix - 1of 1 vote
AnswersGiven an array containing sequence of bits (0 or 1), you have to sort this array in the ascending order i.e. all 0' in first part of array followed by all 1's. The constraints is that you can swap only the adjacent elements in the array. Find the minimum number of swaps required to sort the given input array.
- Ankit October 29, 2012 in India
Example: Given the array (0,0,1,0,1,0,1,1) the minimum number of swaps is 3.
Note: You just need to complete the function given below for this task. The function is given a binary string as input and returns the required answer.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Arrays Data Structures Sorting - 0of 0 votes
AnswersWrite a function to determine node in a tree at maximum depth , with ties to the right ( ties to the right means , right most node at MaxDepth D )
- ibleedscarletgray October 26, 2012 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Data Structures - 0of 0 votes
AnswersIn a hash map with objects as keys,
- msito October 25, 2012 in United States
a) what method do you have to overwrite to do this?
b) how would you resolve a collision?| Report Duplicate | Flag | PURGE
Amazon Intern Data Structures Java - 0of 0 votes
Answers.What do you mean by free pool in data structures
- caliber October 25, 2012 in India| Report Duplicate | Flag | PURGE
Software Engineer / Developer Data Structures - 1of 1 vote
AnswersThere is a given linked list where each node can consist of any number of characters :- For example
- vibsy October 25, 2012 in India
a-->bcd-->ef-->g-->f-->ed-->c-->ba.
Now please write a function where the linked list will return true if it is a palindrome .
Like in above example the linked list should return true| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Software Engineer in Test Data Structures - 0of 0 votes
Answerswhat is hashtalbe?
- kevinspirit7 October 24, 2012 in United States
How to use hashtable?
What is hash function?
How will you deal with hash space conflict?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswerA screen has different shapes of objects. The number f objects is large like million. We want to zoom into a region on the screen. How can we identify which objects should be displayed in the zoomed area? Give a data structure to store objects.
- gradstudent13 October 23, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Intern Data Structures - 0of 0 votes
AnswersWrite code to delete every Nth node from double linked list.
- nprabhanjan October 22, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersThere is a stream of integers coming in. And you have to store top n elements. What data structures you would use?
- Luck Dude October 17, 2012 in United States
1, The solution should be efficient such that n can be millions of integers.
2, Should be able to display integers in descending order. Sorting should not be done whenever requested.
3, Insert, Delete should be as optimal as possible.| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Data Structures - 0of 0 votes
AnswersYou are given intervals of contiguous integers, like [1, 10), [15, 25), [40, 50), which are non-overlapping and of a fixed size.
- Steve October 13, 2012 in United States
Design a data structure to store these intervals and have the operations of insert, delete, and find functions| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Data Structures - 0of 0 votes
AnswersWhat is the base complexity of searching an item in
- Sudha260983 October 10, 2012 in India
a)Selection sort algorithm
b)Linked list
c)BInary Tree
d) Hash table
e) Queue| Report Duplicate | Flag | PURGE
CSC Software Analyst Data Structures - -1of 1 vote
AnswersWe have a long chain of cuboids in all the six directions (six faces). One start node is given and one end node is given. Give a data structure to represent this also search for the given node from start node.
- Nitin Gupta October 08, 2012 in India for Live Cycle| Report Duplicate | Flag | PURGE
Adobe Member Technical Staff Algorithm Data Structures - 0of 0 votes
AnswersGiven a binary tree,Sum all the values of leaves .
- Ramrott October 06, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - -1of 1 vote
AnswersWrite a code to generate Pascals triangle of any level.
- Nitin Gupta October 05, 2012 in India| Report Duplicate | Flag | PURGE
Adobe MTS Algorithm Data Structures - 0of 2 votes
AnswersI have a list of N teams T1, T2, T3 … Tn. Each of these teams has played a match against every other team. I have a function displayResult(Team T1, Team T2), it returns the team which won the match between any two given teams T1 and T2.
- Nitin Gupta October 05, 2012 in India
I have to write the teams in an order such the (n-1)th team (in the order) had lost to the nth team which in turn had lost to (n+1)th team..Write Code| Report Duplicate | Flag | PURGE
Adobe MTS SDE1 Algorithm Data Structures - -1of 1 vote
AnswersFind the mean and median of the elements which are dynamically added at runtime.
- Nitin Gupta October 05, 2012 in India| Report Duplicate | Flag | PURGE
Adobe MTS Algorithm Data Structures