The Wayback Machine - https://web.archive.org/web/20201031183919/https://github.com/kndo/leetcode-python
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

README.md

LeetCode Python Solutions

This repo contains my Python solutions to LeetCode problems. I try to give ample documentation to maximize the pedagogy of my solutions, including time and space complexity and how I arrive at them.

For expediency, when problems involve an array, I am OK with using a Python list instead and using the following operations:

  • for i in range(n): to iterate over indexes
  • for i in range(bigger, smaller, -1): to iterate backwards
  • for num in nums: to iterate over values
  • for i, num in enumerate(nums): to iterate over indexes and values simultaneously
  • nums[-1] to get the last element

While these operations are indeed Pythonic, they don't fundamentally provide any extra functionality over a low-level array. No shortcuts are intentionally made to evade the topic(s) or data structure(s) that the question is testing.

I very much welcome suggestions and corrections. Thanks.

About

No description or website provided.

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.