Why is starting from every index too slow?

Practice this question from Longest Substring Without Repeating Characters - Sliding window Pattern Practice Quiz, with options and an explanation.

Question

Why is starting from every index too slow?

Option A — Correct answer

It repeats scans from many starts

Option B

It uses no variables

Option C

It always returns zero

Option D

It cannot handle empty strings

Explanation

It repeats scans and can cost O(n^2).

Longest Substring Without Repeating Characters - Sliding window Pattern Practice Quiz

All questions · Previous question · Next question

Open on QuizMaker