Leetcode Problem Linked Logic And Casualties