We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
That's rather sloppy of them. The greedy algorithm fails on e.g. making 84 from [2, 3, 7, 12, 14], since the optimal factorization is 7*12 which you can't find if you start by selecting 14; you'd think they'd include some such tests.
K Factorization
You are viewing a single comment's thread. Return to all comments →
That's rather sloppy of them. The greedy algorithm fails on e.g. making 84 from [2, 3, 7, 12, 14], since the optimal factorization is 7*12 which you can't find if you start by selecting 14; you'd think they'd include some such tests.
Thanks, Alex! I almost missed this for my greedy python solution. Indeed very sloppy - this task needs new tests.