Plum Interview Question

Two react machine coding questions