Decode Ways problem solution