-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
Bug Report for https://neetcode.io/problems/is-anagram
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
The recommended complexity section of this problem says this
i.e. O(n+m) time and O(1) space.
But you can either use hashmap approach and have O(n+m) time and O(k) space, where k is number of distinct chars
or you can use sorting and have O(nlogn + mlogm) time and O(1) space.
We can't have both O(n+m) time and O(1) space.
Metadata
Metadata
Assignees
Labels
No labels