Solution+Research

Solution #1: Solution #2: