Check anagrams under real-world constraints
Company: Uber
Role: Data Scientist
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Overview: This question evaluates expertise in string algorithms, multiset equality, algorithmic time/space complexity analysis, memory- and streaming-aware algorithm design, Unicode normalization and case folding, and approximate string matching for k‑off anagrams.
Read the full Uber Data Scientist interview experience this question came from
Constraints
- Inputs are strings
- k counts single-character insertions/deletions
Examples
Input: ('abc', 'cab', 0, False)
Expected Output: True
Explanation: Same multiset.
Input: ('aab', 'ab', 0, False)
Expected Output: False
Explanation: Different counts.
Hints
- A character frequency difference gives the number of insertions/deletions needed.