# finalhw - COP 3503 Final Exam Practice Problems These...

This preview shows pages 1–3. Sign up to view the full content.

COP 3503 – Final Exam Practice Problems These problems are similar in nature to those that you will see on the final exam. The final exam in comprehensive and not every topic that we have covered is represented here so don’t study for the final based upon this homework only! 1. For the binary tree shown below, show the output of a preorder traversal of the tree. For additional practice do: inorder, postorder, and level order traversals. 2. Define and explain the following terms: (1) a greedy algorithm (2) divide and conquer algorithm 3. Show the contents of a stack after each of the following operations. What is the final value of the stack? (1) push (20) (2) push (15) (3) push (pop( ) - pop( )) (4) push (10) (5) push( pop( ) + pop( )) (6) top( ) 1 A B E C F G D H I

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4. Shown below is an expression tree that represents a valid infix expression. Convert the expression to a prefix expression. What technique did you use to do this conversion? 5. Write a pseudocode algorithm that will delete an arbitrary node identified by the pointer del from a doubly linked list. 6. Shown below is a conjecture. Complete an induction proof that proves the conjecture is true for all integer numbers greater than or equal to 1.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern