You are currently viewing the BOOK Programming Interviews Exposed: Secrets to Landing Your Next Job 2nd Ed ISBN: 978-0-470-12167-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .

As I'm looking at the second edition, not the first edition, I can't be sure, but it appears that the page http://www.wiley.com/legacy/compbook...ew/errata.html is a list of errata for the first edition, not the second. The page numbers don't match the second edition. Sadly, it appears that only one of these four errors was corrected in the second edition. Perhaps the additional author for that edition, Eric Gigučre, wasn't aware of this errata page.

I appreciate your pointing out the inelegance of using an extra variable (in this case, the variable "first"). Fortunately, the newest edition (the third edition, copyright 2013) of this book observes that it is valuable "to start the fast pointer one node ahead of the slow pointer so they're not equal to begin with." (p. 59) Hence, the trouble with the earlier published versions is avoided without resorting to the inelegance of using an extra variable.

I appreciate your pointing out the inelegance of using an extra variable (in this case, the variable "first"). Fortunately, the newest edition (the third edition, copyright 2013) of this book observes that it is valuable "to start the fast pointer one node ahead of the slow pointer so they're not equal to begin with." (p. 59) Hence, the trouble with the earlier published versions is avoided without resorting to the inelegance of using an extra variable.