Optimized bubble sort in JavaScript. Cocktail sort
Bubble sort algorithm doesn’t track the current state of the array. Even if it gets the fully sorted array as an input, the runtime will remain of the same O(n^2^) complexity. (more…)
Read more »This summer, I have been working on an experimental React concurrent mode profiler as part of the inaugural batch of the MLH Fellowship. One of the biggest engineering challenges I had was to optimize our canvas rendering. This was no small task. A single… Read more