SOS!!!

Home Forums C Programming SOS!!!

Viewing 4 reply threads
  • Author
    Posts
    • #2127
      GeoffreyBeeler
      Participant

      pls help me…
      i don’t know what to do…
      who can send source code…
       
      Phone book sorter
      The objective is to create an application pbsorter that sorts phonebook entries in ascending order. A phonebook entry is made of a word and a number separated by a comma. Each entry is separated by a newline. An example of unsorted phonebook entries:

      Villar,90912345
      Arroyo,91855661
      Lacson,91681233

      pbsorter can be executed in 2 ways. Suppose the above entries are stored in a file pbook.csv, if we want to sort by name:
      ./pbsorter -a pbook.csv
      The new pbook.csv entries will be:

      Arroyo,91855661
      Lacson,91681233
      Villar,90912345

      If we want to sort by number:
      ./pbsorter -n pbook.csv
      The new pbook.csv entries will be:

      Villar,90912345
      Lacson,91681233
      Arroyo,91855661

      Use getopt to parse the option. Use available sorting functions in the library to perform sorting.

    • #3422
      Humayan
      Participant

      What type of data structure are you supposed to enter the items into ( a linked list , array ) ? What type of sort are you to use?

    • #3423
      GeoffreyBeeler
      Participant

      linked list, any kind of sorting but preferrably binary search tree…

      can you do it asap,,? i need this tomorrow….

      if only….

      thanks..
    • #3424
      Humayan
      Participant

      I have this binary seach tree ( hope this helps ) :
       

    • #3425
      GeoffreyBeeler
      Participant

      thanks..
      that helped a lot…
      hoping for replies again next time…
      thank you very much….

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
Share
Tweet
Share
Pin