Alarm.com interview question

A few brain teasers during the in person interviews. Coding test was mainly algorithms and data structures.