python
python copied to clipboard
Refactored the code to reduce time complexity
The time complexity now is O(n), which was O(nlogn) with the earlier method.
I am creating a pull request for...
- [ ] New algorithm
- [x] Update to an algorithm
- [ ] Fix an error
- [ ] Other - Describe below