Nordstrom Interview Question

regular leetcode problem easy to medium