Case File: The Slow Duplicate Check
The portal checks parcel ids for duplicates and finds ids that two lists share. It works on 30 ids and takes minutes on a real day. The checks run your functions under a trace that counts executed lines and give each a budget, so a slow method fails even when its answer is right. Rewrite them to do one pass with a set.
Case File: The Slow Duplicate Check
The portal checks parcel ids for duplicates and finds ids that two lists share. It works on 30 ids and takes minutes on a real day. The checks run your functions under a trace that counts executed lines and give each a budget, so a slow method fails even when its answer is right. Rewrite them to do one pass with a set.
In this lesson:
- python
- complexity
- big o
- sets
- performance
- case-file
This lesson is part of a paid plan
Upgrade to Pro to unlock this course, its labs and its exam.
View Pricing Plans