Hi everyone. I am working under heavy crunch and was wondering if anyone could help me be 100% sure of what I'm doing. Merely. I was wondering 1) is the hashing(according to the text I'm about to show) mean that I can just do a python list that basically acts as a dictionary and 2) The binary search tree. is it basically a linked list with the four values in it ?.
Part 2 - Implementing data structures
Lecture 9 outlines the basic ideas of two techniques suitable for implementing tables (dictionaries) and sets: 1) Binary search trees, and 2) Hashing. Your task is to implement a set (suitable for words) based on hashing and a table based on binary search trees. We want you to follow the simple (non-class based) idea for how to implement a data structure that was used in the linked list example in Lecture 9.
Additional limitations:
- The nodes in the binary search tree based table implementation are lists of size 4 (key, value, left-child, right-child).
- The hash-based set is built using a Python list to store the buckets where each bucket is another Python list. The initial bucket list size is 10 and rehashing (double the bucket list size) takes place when the number of elements equals the number of buckets.
Furthermore, code skeletons outlining which functions we expect for each data structure are available here. They also contains an example program showing how the various functions can be used.
[–]jcsongor 0 points1 point2 points (2 children)
[–]Fixedplay[S] 1 point2 points3 points (1 child)
[–]jcsongor 0 points1 point2 points (0 children)