https://prit.substack.com/p/hackerrank-max-array-sum-incomplete
Here's a working impl (my take on it):
(defn max-subset-sum [nums]
(let [nxt
#(let [n (count %)
taking (+ %2 (nth % (- n 2) 0))
not-taking (nth % (dec n) 0)]
(conj % (max taking not-taking)))]
(apply max (reduce nxt [] nums))))