SimpliSafe interview question

Two simple HackerRank algorithm questions