Ad
  • Custom User Avatar

    The output of the tests is not very informative in Clojure. Use the are macro, like this:

    (deftest tests
      (are [args expected] (= expected (apply n-groups args))
        [20 5 15] 2
        [40 5 15] 3
      ))
    
  • Custom User Avatar

    It isn't clear what should be returned if there are multiple answers, for instance, when n-elems is 7.

  • Custom User Avatar

    Why is the expected answer for [1000 3 40] 25? All the piles would be equal then. Shouldn't it be 28?