/LeetBox

A LootBox of the fastest and succinctest attempts on LeetCode

Primary LanguagePython

LeetBox

A LootBox of the fastest and most succinct attempts on LeetCode

Language

"Life is short

(You need Python3)."

-- Bruce Eckel

Focus

As this is merely an extracurricular activity, I will be cherry-picking the intriguing questions:

  1. Category: Algorithm
  2. Difficulty: Medium-Hard

Warning/Error/Formatting issues

The code here may trigger warnings/errors while running on your local machine, which is because, behind-the-scenes, LeetCode automatically:

  1. imports packages (e.g. collections, itertools)
  2. loads related data structures (e.g. TreeNode)

LeetCode also (strangely) adopts camelStyle for Python3, which is not recommended in PEPs. Similarly, type hints are not used either : (

However, I am not inclined to change these as this repo intends to provide solutions for LeetCode, hence should be consistent with it.

Disclaimer

Although MOST of these solutions are mine, I don't claim the authorship of ALL the code. This repo intends to provide the best way to solve questions on LeetCode, and food for thought to anyone interested. A better solution is always preferred over my solution.

For the same reason, you are more than welcome to:

  1. Challenge the existing solution by opening a pull request for a better one (faster, more succinct, illustrating or interesting)
  2. Add authorship to any current/new solution.