Summary


Although they are simple data structures, problems about linked lists often arise in interviews focusing on C/C++ experience as a way to determine whether a candidate understands basic pointer manipulation. Each element in a singly-linked list contains a pointer to the next element in the list, while each element in a doubly-linked list points to both the previous and the next elements. The first element in both list types is referred to as the head, while the last element is referred to as the tail. Circularly-linked lists have no head or tail; instead, the elements are linked together to form a cycle.

List operations are much simpler to perform on doubly-linked lists, so most interview problems use singly-linked lists. Typical operations include updating the head of the list, traversing the list to find a specific element from the end of the list, and inserting or removing list elements.




Programming Interviews Exposed. Secrets to Landing Your Next Job
Programming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition (Programmer to Programmer)
ISBN: 047012167X
EAN: 2147483647
Year: 2007
Pages: 94

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net