3 ms·
Ok but what does your intuition say about the first step? > If the value at the start is larger than the value at the end, swap them. What if we skip that? B
by arh68 7y ago
Ok but what does your intuition say about the first step?
> If the value at the start is larger than the value at the end, swap them.
What if we skip that? Broken sort? Is that step necessary, and if so, what's the edge case? Why even mention it? I hope I don't seem combative, I just find my intuition doesn't quite cover this problem.