Snowflake Interview Question

LC Medium + some React (OA)