Search⌘ K

Challenge: Trace the Complete Path of a Journey

Explore how to use hashing and hash tables to trace the full path of a journey from a list of direct source-destination pairs. Understand hash collisions and implement a solution in JavaScript to reconstruct the correct sequence of cities.

We'll cover the following...

Statement

Given an array paths, where pathsipaths_i contains a pair of strings [sourcei,destinationi][source_i, destination_i] ...