Amazon Online Assessment 2021 (OA) - Find Valid Discount Coupons

At Amazon's annual sale. employees are tasked with generating valid discount coupons for loyal customers. However, there are some used/invalid coupons in the mix and the challenge in this task is to determine whether a given discount coupon is valid or not.

This is a companion discussion topic for the original entry at