Re:The World Excel Championship is being broadcast on ESPN
by dullcrisp on Thursday August 11, 2022 @10:19AM
(#32426016)
With only one repeated number, you can sum the array and subtract 1+…+n to get the answer. Still an annoying trick you wouldn’t expect in an algorithm problem. Though the leetcode version also doesn’t require linear time, so I guess you could just iterate and compare in quadratic time to solve it?
[ Parent
| on HN ]
There are no comments on this comment yet.