kamyu104 / LeetCode-Solutions

🏋️ Python / Modern C++ Solutions of All 3343 LeetCode Problems (Weekly Update)
MIT License
4.72k stars 1.56k forks source link

Leetcode 2511 - Fix xrange #182

Closed nitinraturi closed 1 year ago

nitinraturi commented 1 year ago

Python3 error: https://github.com/kamyu104/LeetCode-Solutions/blob/a26137e344650ff9317bac61fa7fe47a49f39f3b/Python/maximum-enemy-forts-that-can-be-captured.py#L12

Change xrange to range.

kamyu104 commented 1 year ago

The solutions of this repository are mainly written in Python2. In Python 3, there is no xrange , but the range function behaves like xrange in Python2. You can replace it yourself if you want to run in Python3.