Why is the brute-force approach less ideal here?
Practice this question from Single Number - XOR Cancellation Pattern Practice Quiz, with options and an explanation.
Question
Why is the brute-force approach less ideal here?
Option A — Correct answer
A frequency map uses extra memory.
Option B
It always uses less memory
Option C
It avoids all edge cases
Option D
It does not read the input
Explanation
A frequency map uses extra memory.