CS 1332 UPDATED Questions and CORRECT Answers parent BF = 2 child BF = 0, 1 ✔✔✔ Right Rotation parent BF = 2 child BF = -1 ✔✔✔ Left-Right Rotation parent BF = -2 child BF = -1, 0 ✔✔✔ Left Rotation parent BF = -2 child BF = 1 ✔✔✔ Right -Left Rotation SkipLists - Search, Add, Remove, Space Best Case ✔✔✔ O(logn) O(logn) O(logn) O(n) - coin always returns T SkipLists - Search, Add, Remove, Space Avg Case ✔✔✔ O(logn) O(logn) O(logn) O(n) SkipLists - Search, Add, Remove, Space Worst Case ✔✔✔ O(n) O(n) O(n) O(nlogn) - coin always returns H adding to hash map when no collision occurs - external chaining ✔✔✔ O(1)* adding to hash map when multiple collisions occur - external chaining ✔✔✔ O(n) worst -case time complexity of adding to a closed -addressing hashmap - external chaining ✔✔✔ O(n) worst time complexity of adding to the hashmap which uses ArrayList as an external chain - external chaining ✔✔✔ O(n^ 2) cost to resize backing array - external chaining ✔✔✔ O(n) adding to hashmap whe n no collisions occur - linear probing ✔✔✔ O(1)* adding to hashmap when multiple collisions occur - linear probing ✔✔✔ O(n)* worst case time complexity of adding an element to an open addressing hashmap - linear probing ✔✔✔ O(n^ 2) cost to resize backing array - linear probing ✔✔✔ O(n), O(n^ 2) worst time complexity of storing height and BF in an A VL node ✔✔✔ O(1)/constant cost to perform rotation - A VL ✔✔✔ O(1) avg & worst time complexity of searching for a data value in an A VL ✔✔✔ O(logn)
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller WIZGrades. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $9.99. You're not tied to anything after your purchase.