Dynamic Programming, Recursion, Competitive Programming, Leetcode, 3sum.
arr[-1]), filtered_two_sums)) # This is to prevent using the same triplets twice. # For example, we delete (1, 4, 3) and only leave (1, 3, 4) filtered_c2 = list(filter(lambda t: t[0] < t[1] < t[2], c2)) return c1 + filtered_c2 The second algorithm is somewhat crude, but that’s probably on me. I bet