Wiley.com
Print this page Share

Programming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition

ISBN: 978-0-470-12167-2
Paperback
264 pages
April 2007
Programming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition (047012167X) cover image
This title is out-of-print and not currently available for purchase from this site.

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
28 Line Missing in Code
When adding a new ListElement/IntElement to the front of the linkedlist, the new element shoudl also update its "next" to point to the previous head.
for example:

bool insertInFront (IntElement **head, int data) {
IntElement *newElem = new IntElement;
if(!newElem) return false;
newElem->data = data;

newElem->next = *head; // THIS LINE IS MISSING

*head = newElem; //Correctly updates head
return true;
}
06/07/07
Back to Top