Leetcode Max Path Sum Of Binary Digits In Python