We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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",
The text was updated successfully, but these errors were encountered:
Problem: this solution makes dict solution worse.
Other solution is create the dict as the following: haystack_dict = {value: key for key, value in enumerate(haystack_list)}
haystack_dict = {value: key for key, value in enumerate(haystack_list)}
Sorry, something went wrong.
No branches or pull requests
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",
The text was updated successfully, but these errors were encountered: