Algorithm · Meta · Medium
Given an integer array cards, locate three positions i, j, and k that are pairwise unequal and whose values sum to exactly 15. Return those three indices in any order you like; if no triple of positions adds up to 15, return an empty array. Repeated values are allowed in the input, and two copies of the same value at different positions count as two separate cards. No single position may appear twice inside one triple, but a value that occurs several times — for instance…
Checking your access…