KiwiTech Interview Question

One of the questions they asked me was to solve a data structures and algorithms problem using JavaScript.