Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Data Structures: ?Please answer #22-24 ASAP! The \"find\" method should throw No

ID: 3680336 • Letter: D

Question

Data Structures: ?Please answer #22-24 ASAP!

The "find" method should throw NotFoundException if found element has state: ACTIVE EMPTY DELETE EMPTY OR DELETED Why did we need to initialize our FHhashQPwFind class with 2 template parameters instead of 1 ? This ensures greater flexibility with initializing our hash table. The first parameter was lonely. The first parameter is the object type we are storing in the table, and the second is the type we are searching by in the find() method. The second parameter serves as an extra search type (in addition to the first one, which is the first parameter) in order to ensure the find() method is accurate. What range of recursion limits generally produces the fastest runtimes when sorting a large array using quicksort? The bigger the better 130 - 190 2 - 25 50 - 150

Explanation / Answer

The “find” method should throw NOtFoundException if found element has state

Ans) Empty.

Find method checks if the element is available or not.if not available it will throws an exception.

Remove method will remove the element from the tree.if find throws exception remove automatically will also throw the exception.But before if we want to remove an element ,first we need to check whether the element is available or not.if available then onbly we can able to delete.

----------------------------------------------------------------------------------------------------------------------------------------------------------

What range of recursion limits generally produces the fastest runtimes when sorting a large array using Quicksort?

Ans) a , when compare to the other sorting techniques quick sort is best suitable for sorting large size of arrays.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Why do we need to initialize our FHhashQPwFind class with 2 template parameters instead of 1?

Ans)the first parameter is the object type we are storing in the table ,and the second is the type we are searching by in the find () method.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------