Stress test, then shrink
transcript
Your solution passes every sample. The judge says wrong answer. And it shows you no input. You must find the bug blind.
Write a slow twin first. It must be short enough to check by reading. Here it sorts the list and takes the first value.
Generate small random lists. Run both versions on each list. Stop at the first difference you find.
In this run, seed one already fails. The list is one and three. The fast version says zero. The twin says one.
A tiny input is easy to trace by hand. So drop the numbers that do not matter. Stop when every remaining number is needed to make it fail.
Now shrink the failing list. Drop the one. A single three still fails, and that is the whole bug report.
A tiny failure is easy to trace by hand. Here the cause was a start value of zero. Full breakdown in the lecture.