Skip to content

donjuardo/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation


LeetCode logo
donjuardo/leetcode

Solutions to LeetCode problems written in Python 3

The algorithm or technique used, the time complexity, the auxiliary space, and the optimality are given as comments at the top of each file. Optimality always favors time.

Built-in sorting algorithms from standard libraries are considered to require $O(1)$ auxiliary space as heapsort exists, even though implementations such as Java's Arrays.sort()'s dual-pivot quicksort and Python's list.sort()'s powersort actually need $O(\mathop{{}^{}\mathrm{lb}} n)$ and $O(n)$ space, respectively.

Note

Binary logarithms, as in logarithmic time, are notated $\mathop{{}^{}\mathrm{lb}} x$ (e.g., lb n) in compliance with ISO 80000-2:2019.

🧩 Solved

  • 1. Two Sum
  • 49. Group Anagrams
  • 217. Contains Duplicate
  • 242. Valid Anagram

📝 To do

  • Write solutions in C

About

Solutions to LeetCode problems written in Python 3

Topics

Resources

License

Stars

Watchers

Forks

Languages