Compass Interview Question

General Javscript questions and two easy/medium datastructures problems.