Bitcoin.com Interview Question

Coding Challenge question on leetcode