Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK Programming Interviews Exposed: Secrets to Landing Your Next Job 3rd Edition
This is the forum to discuss the Wrox book Programming Interviews Exposed: Secrets to Landing Your Next Job, 3rd Edition by John Mongan, Noah Kindler, Eric Giguere; ISBN: 978-1-118-26136-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK Programming Interviews Exposed: Secrets to Landing Your Next Job 3rd Edition 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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 25th, 2018, 04:57 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default List unflattening: wrong running time

The analysis of unflatteningList() on page 57 is incorrect. Its (worst-case) running time is actually O(n*n). For lists like:

node_1 <--> node_2 <--> ... <--> node_N

where each node points to a single-item child list like: node_1->child = child_1, ... node_N->child = child_N

after flattening the list looks like:

node_1 <--> node_2 <--> ... <--> node_N <--> child_1 <--> ... <--> child_N

And unflatteningList() will examine child_N node N times, child_(N-1) node N-1 times, etc.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
List unflattening yamaryl BOOK Programming Interviews Exposed: Secrets to Landing Your Next Job 3rd Edition 0 March 16th, 2016 11:45 AM
List Unflattening MattCruikshank BOOK Programming Interviews Exposed: Secrets to Landing Your Next Job 2nd Ed ISBN: 978-0-470-12167-2 8 March 14th, 2016 11:45 AM
ListView list controls display wrong data the 3rd time muybn ASP.NET 3.5 Professionals 1 August 12th, 2010 06:49 PM
How to display the time(running time) in Excel swaroop Excel VBA 1 March 29th, 2007 01:56 AM
code to make a list, anyone see what is wrong? am6019a VB How-To 3 July 13th, 2006 10:30 AM



All times are GMT -4. The time now is 02:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.