In Data types/structures, when comparing list and dictionary, the functions do not give the same result.
So, we can not compare the execution time.
There is a simple fix. Change this
|
" if needle in haystack_dict: # time O(1) within dict\n", |
to:
" if needle in haystack_dict.values(): # time O(1) within dict\n",
In Data types/structures, when comparing list and dictionary, the functions do not give the same result.
So, we can not compare the execution time.
There is a simple fix. Change this
swd6_hpp/docs/02_data_structures_algorithms_libraries.ipynb
Line 304 in 17b5cc0
to:
" if needle in haystack_dict.values(): # time O(1) within dict\n",