Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/razimantv/leetcode-solutions

My solutions to Leetcode Problems
https://github.com/razimantv/leetcode-solutions

algorithms competitive-programming data-structures leetcode

Last synced: 6 days ago
JSON representation

My solutions to Leetcode Problems

Awesome Lists containing this project

README

        

# LeetCode solutions
My topic-wise collection of LeetCode problems and solutions

## Collected problems by topic
Click on the topic collections to access subtopics, problems, and solutions
### Algorithms
#### Common
* [Array scanning](/Collections/array-scanning.md)
* [Backtracking](/Collections/backtracking.md)
* [Binary search](/Collections/binary-search.md)
* [Bitwise operation](/Collections/bitwise-operation.md)
* [Brute force enumeration](/Collections/brute-force-enumeration.md)
* [Dynamic programming](/Collections/dynamic-programming.md)
* [Graph theory](/Collections/graph-theory.md)
* [Greedy](/Collections/greedy.md)
* [Mathematics](/Collections/mathematics.md)
* [Palindrome](/Collections/palindrome.md)
* [Prefix sums and extrema](/Collections/prefix.md)
* [Sliding window](/Collections/sliding-window.md)
* [Two pointers](/Collections/two-pointers.md)
* [Sorting](/Collections/sorting.md)
* [String](/Collections/string.md)
#### Uncommon
* [Binary lifting](/Collections/binary-lifting.md)
* [Case-by-case analysis](/Collections/case-by-case-analysis.md)
* [Divide and conquer](/Collections/divide-and-conquer.md)
* [Heuristic optimisation](/Collections/heuristic-optimisation.md)
* [Interval operations](/Collections/intervals.md)
* [Meet in the middle](/Collections/meet-in-the-middle.md)
* [Quick Select](/Collections/quick-select.md)
### Data structures
* [Deque](/Collections/deque.md)
* [Disjoint set union](/Collections/disjoint-set-union.md)
* [Hashmap](/Collections/hashmap.md)
* [Linked list](/Collections/linked-list.md)
* [Priority queue](/Collections/priority-queue.md)
* [QuadTree](/Collections/quadtree.md)
* [Queue](/Collections/queue.md)
* [Segment tree](/Collections/segment-tree.md)
* [Stack](/Collections/stack.md)
* [Tree](/Collections/tree.md)
* [Trie](/Collections/trie.md)
* [Data structure design](/Collections/design-data-structure.md)
### Tricks
* [Averaging from total and count](/Collections/averaging-from-total-and-count.md)
* [Dynamic update of left and right neighbours](/Collections/dynamic-update-of-left-and-right-neighbours.md)
* [Offline query processing](/Collections/offline-query-processing.md)
* [Precomputation to answer queries efficiently with delta](/Collections/precomputation-to-answer-queries-efficiently-with-delta.md)
* [Process in unusual order](/Collections/process-in-unusual-order.md)
* [Process multiple vectors together](/Collections/process-multiple-vectors-together.md)
* [Range updates using prefix sum](/Collections/range-updates-using-prefix-sum.md)
* [Search by iterative bound improvement](/Collections/search-by-iterative-bound-improvement.md)
* [Time reversed simulation](/Collections/time-reversed-simulation.md)
* [Unique/duplicate element finding with bizarro algorithms](/Collections/unique-duplicate-element-finding-with-bizarro-algorithms.md)
### Problem types
* [Concurrency](/Collections/concurrency.md)
* [Construction](/Collections/construction.md)
* [Counting elements in array](/Collections/counting-elements-in-array.md)
* [Encoding and decoding](/Collections/encoding-and-decoding.md)
* [Flattening](/Collections/flattening.md)
* [Formatted output](/Collections/formatted-output.md)
* [Integer operations on strings](/Collections/integer-operations-on-strings.md)
* [Matrix](/Collections/matrix.md)
* [Majority element](/Collections/majority-element.md)
* [Number transformations based on mathematical rules](/Collections/number-transformations-based-on-mathematical-rules.md)
* [Permutations](/Collections/permutation.md)
* [Pointers](/Collections/pointers.md)
* [Points in 2D plane](/Collections/points-in-2d-plane.md)
* [Simple implementation](/Collections/simple-implementation.md)
* [Two player games](/Collections/two-player-games.md)
* [Valid subarray counting](/Collections/valid-subarray-counting.md)
* [Unique elements in subarray](/Collections/unique-elements-in-subarray.md)
### Other
* [ChatGPT-generated](/Collections/chatgpt.md)
* [Untagged problems](/Collections/untagged.md) (Help me!)
* [Non-conforming solutions](/Collections/fraud.md)
* [Suboptimal solutions](/Collections/suboptimal-solution.md)

## Footnote
* All are AC solutions
* Very few will have comments, because I wrote them for myself, often during contests. But raise an issue if you want to understand more about a solution, and I will add an explanation
* There is a small chance that a handful of solutions are not mine, because I sometimes submit solutions that my students ask me to debug. Raise an issue and I will remove it