Question
A circular conveyor belt carries labelled totes past a scanner. Two snapshots of the belt were taken at different moments, each listing tote labels in belt order starting from the scanner. Return true if the second snapshot could be the same belt photographed later — that is, if it can be obtained by rotating the first snapshot — and false otherwise. Two empty snapshots match. Example: [1, 2, 3, 4] and [3, 4, 1, 2] match.
same_belt(first: list[int], second: list[int]) → bool[[1,2,3,4],[3,4,1,2]]outtrueState your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.