2 q's re sedgewick's algorithms in c parts 1-4 book

Discussion in 'C Programming' started by ben, Nov 12, 2004.

  1. ben

    ben Guest

    (this isn't going to make any sense unless you have sedgewick's
    "algorithms in c parts 1-4" (but the 2nd question might make sense))


    page 484, program 12.2 -- exactly what code/files should be used with
    it in order to compile program 12.2?
    there's two lines:
    #include "Item.h"
    #include "ST.h"
    but it is not clear at all which files or code they are. i've had a
    look on the book's support site and found all the code but there's no
    indication of any file names. also i don't see 'Key' declared/typed/or
    whatever the correct phrase is anywhere in all the code, not once.

    so basically, what do i need in order to compile program 12.2?



    also this bit i find very confusing (from page 612):

    Suppose that the keys are words of a fixed length, all consisting of w
    bits. Our requirement that keys are distinct implies that N <= 2^w, and
    we normally assume that N is significantly smaller that 2^w, since
    otherwise key-indexed search (see section 12.2) would be the
    appropriate algorithm to use.

    section 12.2 makes it clear that key-index searching is only useful for
    very small table sizes. the above text makes it sound like key-indexed
    searching would be appropriate if N was only slightly smaller that 2^w.
    seems completely illogical. is that a basic english logic mistake or
    have i misunderstood?

    any help much appreciated.

    thanks, ben.
     
    ben, Nov 12, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Vinokur
    Replies:
    0
    Views:
    988
    Alex Vinokur
    Aug 30, 2004
  2. entropy123

    Help: Algorithms in C (Sedgewick) "Graph.h"

    entropy123, Jul 29, 2003, in forum: C Programming
    Replies:
    1
    Views:
    602
    Martijn
    Jul 29, 2003
  3. ben
    Replies:
    4
    Views:
    460
  4. Replies:
    3
    Views:
    609
    Keith Thompson
    Mar 31, 2007
  5. arnuld

    Algorithms in C - Robert Sedgewick

    arnuld, Sep 8, 2009, in forum: C Programming
    Replies:
    23
    Views:
    1,528
    luserXtrog
    Sep 13, 2009
Loading...

Share This Page