Wrox Home  
Search titles for:

Topic: General

Cover image for product 047012167X
Programming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition
John Mongan, Noah Suojanen, Eric Gigučre
ISBN: 978-0-470-12167-2
Paperback
264 pages
April 2007
Other Available Formats: Adobe E-Book
Paperback Version: US $29.99 Add to Cart

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
Get More Wrox For Less!