hw2_sol - 1.) (a) floor(lg(n) (b) ceiling(n/2) (c)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1.) (a) floor(lg(n)) (b) ceiling(n/2) (c) theta(n^2) For parts a and b, there is not much to grade except if the answer is correct or not. They may have tried to express the solution as a range rather than using the floor and ceiling functions. As long as the solution is mathematically equivalent, they should receive credit. For part c, some students may have calculated the solution to be theta(n). We had a discussion about this for some time, so it is may be common to think the order is theta(n). If they believe it is theta(n) and give a good explanation, they should receive 4 points out of the 8. Otherwise, if they show their work, they should receive 3 out of the 8. 2.) The grading for problem 2 is relatively straightforward. Students were allowed to use a preorder, inorder, or postorder traversal. A preorder traversal led to a trivial solution (but it is still 100% acceptable). (a) a / \ b c / \ / \ d e f g / k \ i (b) The easiest way to do this problem was to do a preorder traversal, which
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

hw2_sol - 1.) (a) floor(lg(n) (b) ceiling(n/2) (c)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online