student name: Yukang Yin
student email: [email protected] and [email protected]
student number: 300162143 (University of Ottawa)
Three search algorithms are implemented in this course project:
- naive binary search
- iterated searh
- fractional cascading
-
naive binary search solution is organized in
naive_binary_search.py
-
iterated search solution is organized in
iterated_search_node.py
anditerated_search.py
-
fractional cascading search solution is organized in
fractional_cascading_node.py
andfractional_cascading.py
-
execution code is organized in
main.py
-
define input arrays in
main.py
populate
arr
with valid input arrays, such as[[4, 6, 7, 8, 12], [1, 2, 5, 11, 15], [3, 9, 10, 13, 14]]
-
define query key in
main.py
populate
query_key
with valid query key, such as11
-
initialize a search solution by passing input arrays into solution's constructor, such as
fractional_cascading = FractionalCascading(arrs)
-
merge input arrays and calculate pointers, such as
fractional_cascading.merge_input_arrs() fractional_cascading.calculate_pointers()
-
invoke search solution's
find
method by passing into query key, such asfractional_cascading.find(query_key)