Workday Interview Question

5/6 coding question in python/bash