Skip to content

Non-compatible function #17

@patricia-ternes

Description

@patricia-ternes

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",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions