How to calculate the difference between 2 dates in Javascript?
It would have been great if Javascript date objects could have been substracted like numbers. const then = new Date(); const now = new Date(); const difference = now - then;But unfortunately, that's not possible
Getting started with algorithms using arrays
Arrays are a good way to dip your toe in the study of algorithms. They are not as complex as Trees or graphs and can serve a smooth bridge into more complex alogrithms.
Sorting an array using Merge Sort
Merge Sort is probably one of the best sorting algorithms. It works by repeatedly dividing an array into smaller parts and combining the results. It keeps dividing the array until the array size
How to find the smallest number in an array?
Finding the smallest number in an array could be as simple as sorting the array and taking the number at the first index. But would be a very inefficient way doing it. A
Sorting an Array Using Selection Sort
Selection sort is probably the simplest sorting algorithm (for the programmer not the computer). The selection sort algorithm stays true to it's name and works by finding the given array's minimum (or maximum