The word first turns an overtake into an ordered-search problem. We’ll scan same-input comparisons from left to right, find the first strict reversal, and verify the immediately preceding row still has the old ordering.
Inside Gozunta
Turn the preview into practice.
More than a preview
Gozunta lets you study this problem—and more than 10,000 others.
Create targeted learning sessions, use hints, check your answer, read the walkthrough, watch the video, print the work, and track your progress.