o(n) skidesigh