ThePrimeagen / kata-machine

1.28k stars 1.27k forks source link

npx jest Bubble test keeps on running #56

Closed IAMAFIVESTARMAN closed 1 year ago

IAMAFIVESTARMAN commented 1 year ago

image

nroize commented 1 year ago

There's a mistake in your inner loop. It should be looping while j < arr.length - i, but you have it loop while i < arr.length - i, which is always true. This is causing your inner loop to go on forever. Hope this helps!

IAMAFIVESTARMAN commented 1 year ago

Thank you , I am an idiot