Tesla Interview Question

Standard leet code problems easy to medium