Tesla Interview Question

Several code questions ripped straight out of leetcode/hackerrank