Linked Lists Interview Questions
- 0of 0 votes
AnswersSort a linked list using bubble sort.
- Ankit June 24, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Linked Lists - 0of 0 votes
AnswersConvert a binary search tree to a circular sorted linked list. The highest valued node should point to the lowest valued node at each step.
- prolificcoder April 27, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C++ Coding Data Structures Linked Lists - 0of 0 votes
AnswersTest a function that sorts a linked list. You have two pointers head which is the original unsorted list and head1 which is said to be the sorted linked list. Return true if head1 did the sorting correctly and return false if not.
bool testlinkedlistsort(Node *head,Node *head1)
I got the solution correct but messed it up while writing it over the white board :|
- prolificcoder April 27, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C++ Coding Data Structures Debugging Testing Linked Lists - 0of 0 votes
AnswersImplement a double linked list using a single linked list. You have given only data and one pointer in struct node { int data, struct node *ptr}.
- Pranav Jadhav April 19, 2009
You should be able to traverse in both directions.| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer / Developer Linked Lists - 0of 0 votes
AnswersHow would you eliminate duplicates in a linked list(singly) without using extra memory. You can use new variables for storing pointers but cannot go on to have a pointer for each node in the list.
- MSrej March 08, 2009
- The values in the node are unicode characters.
- for eg: a->b->c->a->d->NULL
should be transformed to:
a->b->c->d->NULL| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Linked Lists - 1of 0 votes
AnswersThere are two linked lists which converge at one point. Return the 1st node at which they converge
[__]-->[__]-->[__]--> [__]-->[__] [__]-->
Hope my diagram is understandable
- Anonymous February 11, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Software Engineer in Test Linked Lists - 2of 2 votes
AnswersFind the length of a linked list which contains cycle.
- test January 16, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Linked Lists - 0of 0 votes
AnswersWrite a code to reverse alternate nodes in a link list.
- Meghna December 05, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Linked Lists - 0of 0 votes
AnswersWrite a method in C to reverse a linked list.
- Andy November 13, 2008| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Terminology & Trivia Linked Lists - 0of 0 votes
AnswersWrite code and test cases for traversing a linked list.
- Aniruddha Gore November 03, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Testing Linked Lists - 0of 0 votes
AnswerCompare and contrast dynamic array & linked list
- Raady October 18, 2008| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test Linked Lists - 0of 0 votes
AnswersReverse the link list. Write a code and dictate it. Write two approaches: recursive and non-recursive
- Xenith September 06, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding Linked Lists - 2of 0 votes
AnswersList as many data structures as you can think of. How do you detect a loop in a linked list?
- Bloomberg london July 31, 2008| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Data Structures Algorithm Linked Lists - 0of 0 votes
AnswerWhat is linked list? Write code to detect a loop in a single linked list.
- moovgoar July 22, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding Linked Lists - 1of 0 votes
AnswersHow to delete the kth element from the end of a linked list?
- himanshu July 22, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding Algorithm Linked Lists - 1of 0 votes
AnswersI had first round of phone interview today. She asked me to write two very simple codes in C++ and dictate her as I write. She was also writing the code as I was coding. The questions were:
- Aniruddha Gore June 26, 2008
1. Write code to find nth node (from front) in a linked list.
2. Write code to find minimum node in a BST.
Then test cases for both of these questions. Then the same question which need use of "uniq" command of UNIX.| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Coding Linked Lists - 0of 0 votes
AnswersWrite a function to find mid point of a linked list
- mp April 10, 2008| Report Duplicate | Flag | PURGE
Amazon Morgan Stanley Software Engineer / Developer Algorithm Linked Lists - 0of 0 votes
Answers1. DMA controller.
- Backbone April 01, 2008
2. Cache coherency.- MESI /MSI protocol
3. Cache coherency mechanism.
4. Interrupt handler.
5. what happens when function1 calls function2 with it.(like where does the linkage register stuff get stored..and resume execution)
6.Can u have reentrant code inside interrupt handler. (NO)
7.What will happen/can u have printf/printk inside an interrrupt hancler (i think he wanted me to say no.. but I did not know the reason)
8.context switch.. when do u need it.
9.what does a interrupt handler take in as input... and what does it return.( it does not accept or return anything)
10. what is the difference between ISR and interrupt handler.(Both are the same)
11.how to search a book in one million books.
12.How to check whether a linked list is circular.| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer / Developer Linux Kernel Computer Architecture & Low Level Linked Lists - 0of 0 votes
AnswersWrite code (in C) to convert a binary search tree into a sorted doubly linked list. The algorithm should use recursion and should be done in place.
- Ravi Kant Pandey April 25, 2007| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer Coding Algorithm Linked Lists - 0of 0 votes
AnswersWrite a C code to conert a binary search tree to a linked list
- amar April 14, 2007| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer Algorithm Linked Lists - 0of 0 votes
AnswersGiven a doubly linked circular linked list and a pointer to any node and a number 'n'. Starting from the given node, keep on deleting the "nth" node till one node remains. Return a pointer to that node.
- Jack Sparrow August 09, 2006| Report Duplicate | Flag | PURGE
Microsoft Object Oriented Design Linked Lists - 0of 0 votes
AnswersHow will you determine if a loop exists in a link list?
- Philip July 24, 2006| Report Duplicate | Flag | PURGE
Expedia Amazon NVIDIA Knoa Software Apple Software Engineer / Developer Intern Algorithm Linked Lists - 0of 0 votes
AnswersGiven a circular linked list where the length of the stem can be arbitrary (the shape of the list can be like number 6). What is the size of the list?
- blue June 20, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Object Oriented Design Linked Lists - 0of 0 votes
AnswersAsked me to reverse a Linked list without re-creating a new one. I did it recursively going all the way to end and linking it backwards after the recursive call. Had to pass in two nodes though, one previous and one current. He said he likes iteration better becoz its more resource friendly :)
- Muhariz Jabeer May 24, 2006| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding Linked Lists - 0of 0 votes
Answers2nd interview was on-site, with one of the team developers. Given a linked list, swap values inside nodes. Now do it by swaping the node pointers. This wasn't a hard question at all, but more of an organization question for me because it was kind of a twisted question and easy to be off by one pointer.
- Jack February 17, 2006| Report Duplicate | Flag | PURGE
Expedia Software Engineer / Developer Coding Linked Lists - 0of 0 votes
AnswersComplexity of insertion and deletion for linked list.
- SJ December 14, 2005| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Terminology & Trivia Linked Lists - 0of 0 votes
AnswersHow would you detect a repeated element in an integer array. Discuss various solutions and the order of the algorithm.
- Programmer April 08, 2005| Report Duplicate | Flag | PURGE
Amazon Algorithm Linked Lists - 0of 0 votes
AnswersWhat's the max insertion time for a hash table
- Gayle L McDowell April 04, 2005| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Terminology & Trivia Linked Lists