🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Approaching DSA Interview Problems: all 10 questions

Quiz: Approaching DSA Interview Problems · Question 4 of 10

Why state a brute-force solution before optimising?

Why state a brute-force solution before optimising?

  1. A.Interviewers only want brute force
  2. B.Brute force is always fast enough
  3. C.It avoids writing any code
  4. D.It shows a correct baseline, and its repeated work points to the optimisation
Answer & explanation

Correct answer: It shows a correct baseline, and its repeated work points to the optimisation

The fast solution usually removes exactly the work the brute force repeats.

Can you get the rest right without peeking?

Take the timed Quiz: Approaching DSA Interview Problems quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →