Skip to content

error: space complexity is mentioned as O(logn) instead of O(n) in Anagrams section of String #684

Open
@The-East-Wind

Description

@The-East-Wind

Issue

In the Anagrams section of the Strings cheatsheet the space complexity of the approach where sorting both the input strings to determine it they are anagrams or not is mentioned as O(logn) but the actual space complexity is O(n) (since we'll need 2 additional strings of size n for storing sorted copy of the 2 input strings).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions