‹ Kinyanjui Wangonya

Tags / algorithms


The Fibonacci sequence is a sequence of numbers such that any number, except for the first and second, is the sum of the previous two.

I’m going to show Javascript implementations of three more sorting algorithms:

  • Quick sort
  • Heap sort
  • Counting sort

Again, this is not intended to be an in-depth explanation on the ins and outs of how the algorithms work and their performance. If you’d rather read about that, here’s a nice resource I found: Sorting Algorithms

I’ve been learning a lot about data structures and algorithms lately and I’ve noticed in my reading that there aren’t a lot of examples showing implementations of algorithms in Javascript. You’ll mostly find examples in Java, Python, C, C++ etc. Maybe there’s a reason for preferring these languages over Javascript? I’m not sure.

In this first part, I’m going to show Javascript implementations of three sorting algorithms:

  • Merge sort
  • Insertion sort
  • Bubble sort

This is not intended to be an in-depth explanation on the ins and outs of how the algorithms work and their performance. If you’d rather read about that, here’s a nice resource I found: Sorting Algorithms

« Older posts Newer posts »