Why is the brute-force approach less ideal here?

Practice this question from First Unique Character - Frequency Map Pattern Practice Quiz, with options and an explanation.

Question

Why is the brute-force approach less ideal here?

Option A — Correct answer

It rescans the string for every character.

Option B

It is always constant time

Option C

It uses no repeated work

Option D

It requires binary tree recursion

Explanation

It rescans the string for every character.

First Unique Character - Frequency Map Pattern Practice Quiz

All questions · Previous question · Next question

Open on QuizMaker