https://medium.com/@etirismagazine/mastering-advanced-data-structures-and-algorithms-in-javascript-874250e4b3e2