SmartThings Interview Question

Programming challenges... algorithms