Bug-Free serial O(n)