Sponsored Links


Results 1 to 2 of 2

Thread: CS301 Data Structures Assignment # 3 May 2010

  1. #1
    Senior Member Awais's Avatar
    Join Date
    May 2010
    Posts
    111

    28 CS301 Data Structures Assignment # 3 May 2010

    Sponsored Links


    CS301 – Data Structures
    Assignment No.3
    Mark: 20
    Deadline

    Your assignment must be uploaded/submitted at or before May 17, 2010

    Assignment


    Question
    Consider a binary search tree (BST) that is initially empty. Draw the tree that will result if the following numbers are inserted in the same order given below: 5 Marks

    13, 3,1,2,4,12,10,5,8,7,6,9,11,14,15,18

    After making a BST perform the following operations on it.

    a) Pre order Traversal 5 Marks
    b) Inorder Traversal 5 Marks
    c) Postorder Traversal 5 Marks


    Sponsored Links

  2. #2
    Senior Member viki's Avatar
    Join Date
    May 2010
    Posts
    2,132
    Solution

    Binary Search Tree (BST) drawn with the following numbers when inserted in the same order as given 13,3,1,2,4,12,10,5,8,7,6,9,11,14,15,18
    1.JPG

    a. Pre order Traversal

    13,3,1,4,2,12,10,5,11,8,7,9,6,14,15,18

    b. In Order Traversal

    1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18

    c. Post Order Traversal

    2,1,6,7,8,9,5,10,11,12,4,3,18,15,14,13
    Last edited by viki; 05-17-2010 at 10:32 PM.
    :o:o--------------------------------------------------------------------------------------:o:o
    [B]The more knowledge you have, the greater will be your fear of Allah.[/B]

    Please Join My [B]Group Vuhelp[/B][B], Birthday Wishing, Daily Hadees[/B] [CODE][B]http://vuhelp.net/groups/vuhelp.html[/B]
    [B]http://vuhelp.net/groups/birthday-wishing.html[/B]
    [B]http://vuhelp.net/groups/daily-hadees.html[/B][/CODE]
    [CENTER][B][COLOR="Red"][SIZE="4"]Email: [email]viki@vuhelp.net[/email][/SIZE][/COLOR][/B][/CENTER]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CS301 Data Structures announcement fall 2010
    By Xpert in forum MCQ's & Quiz Discussion
    Replies: 0
    Last Post: 11-10-2010, 09:59 PM
  2. Replies: 0
    Last Post: 08-28-2010, 06:10 PM
  3. CS301 Data Structures Assignment # 3 May 2010
    By Awais in forum Assignments & Solutions
    Replies: 0
    Last Post: 05-14-2010, 10:21 PM
  4. CS301 Data Structures Assignment # 3 May 14. 2010
    By Awais in forum Assignments & Solutions
    Replies: 0
    Last Post: 05-14-2010, 10:20 PM
  5. CS301 Data Structures Assignment # 3 May 14. 2010
    By Awais in forum Assignments & Solutions
    Replies: 0
    Last Post: 05-14-2010, 10:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft