Basic Implementation of B+ Tree of general order in python3
, which can be run using the following command:
python3 part1.py <filepath>
Each line of file should contain a query. The following types of queries are supported:
- INSERT x - Inserts x into the B+ tree
- FIND x - Prints YES if x is already inserted, else NO
- COUNT x - Prints number of occurrences of x in B+ tree
- RANGE x y - Prints number of elements in range x to y (both x and y included)
Here, -109 <= x, y <= 109.
Implementation of linear hashing algorithm described here in python3
, explained in class, to handle duplicate elimination.
python3 part2.py <filepath>
Each line of input file should contain an integer x, x is printed if it was not inserted before in the hashtable. Here, -109 <= x <= 109.