What is the brute-force two-pass approach?
Practice this question from Remove Nth Node From End - Two pointers Pattern Practice Quiz, with options and an explanation.
Question
What is the brute-force two-pass approach?
Option A — Correct answer
Count length, compute the front index, then walk again
Option B
Use a heap
Option C
Use binary search on values
Option D
Compare character counts
Explanation
Count length, compute the front index to remove, then walk again.