This is part of a series of Leetcode solution explanations (index). If you liked this solution or found it useful, […]