From Captain Obvious

Aug 27, 2017 15:53

On a (Python) interview a candidate is asked to consider a collection of values and answer if all of the values are the same. The answer was to populate a set with those values (one-liner in Python), then check its length. Why is it not a great idea and what should we do instead (maybe)?

python, algorithm

Previous post Next post
Up