Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Binary Tree's

  • 20-08-2010 2:04pm
    #1
    Registered Users, Registered Users 2 Posts: 159 ✭✭


    Hi guys I'm studying Software Development at the moment in GMIT and I have a repeat exam next week.:(
    I have no notes on how to do Binary tree's, Queues+Stacks and can find very little on the web (most of it relates to how you can do it through code but I just need to be able to draw out the solutions on paper.
    If you could point me towards an online tutorial or help me out yourselves I would be enternally gratefuly.
    Thanks

    The two questions in question(don't know if this is grammatically correct):

    (a) i) Draw a Binary Tree for the following expression:
    A * ( B - C ) / D – E * ( F – G * H ) ( 9 Marks)

    ii) List the nodes in Preorder and Postorder. ( 4 Marks)

    (b) i) Construct a Binary Search Tree for the following:
    Helen, Victor, David, Niall, Ivan, Quentin, Jim, Orla, Rick, Pat, Tom ( 4 Marks)

    ii) Using this Binary Tree, explain how deletions are accomplished,
    as each of the following are deleted: Jim, Rick, Niall
    Draw the resulting Tree in each case.
    7. (a) i) Define a Queue. ( 4 Marks)

    ii) What is a Priority Queue? ( 4 Marks)

    (b) Show, diagrammatically, how a Stack is used to convert the following
    expression from Infix to Postfix notation:
    A * ( B / C ) + D – E + F * G
    Trace the contents of Stack and Postfix String as each character is processed. (12 Marks)


Comments

  • Moderators, Science, Health & Environment Moderators Posts: 21,693 Mod ✭✭✭✭helimachoptor


    Ask your lecturer :)


  • Registered Users, Registered Users 2 Posts: 159 ✭✭congress3


    Ask your lecturer :)

    Wish it was that simple, Lecturer disappears till we're back in September.


  • Registered Users, Registered Users 2 Posts: 4,277 ✭✭✭km991148


    Even wikipedia has stuff on datastructues, but I would be down that library and get reading! No point blindly giving the answers for questions like this (I dont mean that to sound harsh, but find some materials and read up, then maybe post back).
    What was the textbook for the course?


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    km991148 has sort of said this too, but there is absolutely loads of introductory material on binary trees out there on the internet.

    Just google for binary tree.


    Read the articles.
    Expect not to understand it at the start, but that it will come together as you work through it.

    You will have to work through it. It'll take you a couple of hours. Do the work.


    With any reasonable understanding of the core concepts of binary trees, and you'll be able to do the questions you give - they'll be covered in almost any introduction.

    From the first page of google results for 'binary trees':
    http://www.youtube.com/watch?v=V_3BM0ykITM

    thats a link to a berkeley CS lecture on binary search trees. You might want to watch the previous lecture too if you want to start from the basics.

    But really, when you can get the detailed CS lectures from elite us colleges by just googling for your query, you've really got no excuse, just get down to it.


  • Registered Users, Registered Users 2 Posts: 2,353 ✭✭✭Galway K9


    Its been ages since ive done this withEleanor i think it is....


  • Advertisement
Advertisement