Aggressive Cows Leetcode Problem