TIDAL interview question

Basic algorithms and leetcode in js