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

https://github.com/nishant25kr/dsa-codes

A collection of LeetCode questions to ace the coding interview!
https://github.com/nishant25kr/dsa-codes

cpp dsa-algorithm leetcode-cpp

Last synced: 4 months ago
JSON representation

A collection of LeetCode questions to ace the coding interview!

Awesome Lists containing this project

README

        

# DSA-codes
A collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

# LeetCode Topics
## Array
| |
| ------- |
| [0001-two-sum](https://github.com/nishant25kr/DSA-codes/tree/master/0001-two-sum) |
| [0031-next-permutation](https://github.com/nishant25kr/DSA-codes/tree/master/0031-next-permutation) |
| [0045-jump-game-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0045-jump-game-ii) |
| [0048-rotate-image](https://github.com/nishant25kr/DSA-codes/tree/master/0048-rotate-image) |
| [0053-maximum-subarray](https://github.com/nishant25kr/DSA-codes/tree/master/0053-maximum-subarray) |
| [0054-spiral-matrix](https://github.com/nishant25kr/DSA-codes/tree/master/0054-spiral-matrix) |
| [0055-jump-game](https://github.com/nishant25kr/DSA-codes/tree/master/0055-jump-game) |
| [0073-set-matrix-zeroes](https://github.com/nishant25kr/DSA-codes/tree/master/0073-set-matrix-zeroes) |
| [0075-sort-colors](https://github.com/nishant25kr/DSA-codes/tree/master/0075-sort-colors) |
| [0088-merge-sorted-array](https://github.com/nishant25kr/DSA-codes/tree/master/0088-merge-sorted-array) |
| [0121-best-time-to-buy-and-sell-stock](https://github.com/nishant25kr/DSA-codes/tree/master/0121-best-time-to-buy-and-sell-stock) |
| [0128-longest-consecutive-sequence](https://github.com/nishant25kr/DSA-codes/tree/master/0128-longest-consecutive-sequence) |
| [0136-single-number](https://github.com/nishant25kr/DSA-codes/tree/master/0136-single-number) |
| [0162-find-peak-element](https://github.com/nishant25kr/DSA-codes/tree/master/0162-find-peak-element) |
| [0169-majority-element](https://github.com/nishant25kr/DSA-codes/tree/master/0169-majority-element) |
| [0229-majority-element-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0229-majority-element-ii) |
| [0268-missing-number](https://github.com/nishant25kr/DSA-codes/tree/master/0268-missing-number) |
| [0455-assign-cookies](https://github.com/nishant25kr/DSA-codes/tree/master/0455-assign-cookies) |
| [0485-max-consecutive-ones](https://github.com/nishant25kr/DSA-codes/tree/master/0485-max-consecutive-ones) |
| [0890-lemonade-change](https://github.com/nishant25kr/DSA-codes/tree/master/0890-lemonade-change) |
| [0966-binary-subarrays-with-sum](https://github.com/nishant25kr/DSA-codes/tree/master/0966-binary-subarrays-with-sum) |
| [1046-max-consecutive-ones-iii](https://github.com/nishant25kr/DSA-codes/tree/master/1046-max-consecutive-ones-iii) |
| [1370-count-number-of-nice-subarrays](https://github.com/nishant25kr/DSA-codes/tree/master/1370-count-number-of-nice-subarrays) |
| [1408-find-the-smallest-divisor-given-a-threshold](https://github.com/nishant25kr/DSA-codes/tree/master/1408-find-the-smallest-divisor-given-a-threshold) |
| [1538-maximum-points-you-can-obtain-from-cards](https://github.com/nishant25kr/DSA-codes/tree/master/1538-maximum-points-you-can-obtain-from-cards) |
| [1878-check-if-array-is-sorted-and-rotated](https://github.com/nishant25kr/DSA-codes/tree/master/1878-check-if-array-is-sorted-and-rotated) |
| [2271-rearrange-array-elements-by-sign](https://github.com/nishant25kr/DSA-codes/tree/master/2271-rearrange-array-elements-by-sign) |
## Hash Table
| |
| ------- |
| [0001-two-sum](https://github.com/nishant25kr/DSA-codes/tree/master/0001-two-sum) |
| [0003-longest-substring-without-repeating-characters](https://github.com/nishant25kr/DSA-codes/tree/master/0003-longest-substring-without-repeating-characters) |
| [0073-set-matrix-zeroes](https://github.com/nishant25kr/DSA-codes/tree/master/0073-set-matrix-zeroes) |
| [0128-longest-consecutive-sequence](https://github.com/nishant25kr/DSA-codes/tree/master/0128-longest-consecutive-sequence) |
| [0141-linked-list-cycle](https://github.com/nishant25kr/DSA-codes/tree/master/0141-linked-list-cycle) |
| [0142-linked-list-cycle-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0142-linked-list-cycle-ii) |
| [0160-intersection-of-two-linked-lists](https://github.com/nishant25kr/DSA-codes/tree/master/0160-intersection-of-two-linked-lists) |
| [0169-majority-element](https://github.com/nishant25kr/DSA-codes/tree/master/0169-majority-element) |
| [0229-majority-element-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0229-majority-element-ii) |
| [0268-missing-number](https://github.com/nishant25kr/DSA-codes/tree/master/0268-missing-number) |
| [0424-longest-repeating-character-replacement](https://github.com/nishant25kr/DSA-codes/tree/master/0424-longest-repeating-character-replacement) |
| [0966-binary-subarrays-with-sum](https://github.com/nishant25kr/DSA-codes/tree/master/0966-binary-subarrays-with-sum) |
| [1370-count-number-of-nice-subarrays](https://github.com/nishant25kr/DSA-codes/tree/master/1370-count-number-of-nice-subarrays) |
| [1460-number-of-substrings-containing-all-three-characters](https://github.com/nishant25kr/DSA-codes/tree/master/1460-number-of-substrings-containing-all-three-characters) |
## Math
| |
| ------- |
| [0048-rotate-image](https://github.com/nishant25kr/DSA-codes/tree/master/0048-rotate-image) |
| [0050-powx-n](https://github.com/nishant25kr/DSA-codes/tree/master/0050-powx-n) |
| [0231-power-of-two](https://github.com/nishant25kr/DSA-codes/tree/master/0231-power-of-two) |
| [0268-missing-number](https://github.com/nishant25kr/DSA-codes/tree/master/0268-missing-number) |
| [1370-count-number-of-nice-subarrays](https://github.com/nishant25kr/DSA-codes/tree/master/1370-count-number-of-nice-subarrays) |
## Binary Search
| |
| ------- |
| [0162-find-peak-element](https://github.com/nishant25kr/DSA-codes/tree/master/0162-find-peak-element) |
| [0268-missing-number](https://github.com/nishant25kr/DSA-codes/tree/master/0268-missing-number) |
| [1046-max-consecutive-ones-iii](https://github.com/nishant25kr/DSA-codes/tree/master/1046-max-consecutive-ones-iii) |
| [1408-find-the-smallest-divisor-given-a-threshold](https://github.com/nishant25kr/DSA-codes/tree/master/1408-find-the-smallest-divisor-given-a-threshold) |
## Bit Manipulation
| |
| ------- |
| [0136-single-number](https://github.com/nishant25kr/DSA-codes/tree/master/0136-single-number) |
| [0231-power-of-two](https://github.com/nishant25kr/DSA-codes/tree/master/0231-power-of-two) |
| [0268-missing-number](https://github.com/nishant25kr/DSA-codes/tree/master/0268-missing-number) |
## Sorting
| |
| ------- |
| [0075-sort-colors](https://github.com/nishant25kr/DSA-codes/tree/master/0075-sort-colors) |
| [0088-merge-sorted-array](https://github.com/nishant25kr/DSA-codes/tree/master/0088-merge-sorted-array) |
| [0169-majority-element](https://github.com/nishant25kr/DSA-codes/tree/master/0169-majority-element) |
| [0229-majority-element-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0229-majority-element-ii) |
| [0268-missing-number](https://github.com/nishant25kr/DSA-codes/tree/master/0268-missing-number) |
| [0455-assign-cookies](https://github.com/nishant25kr/DSA-codes/tree/master/0455-assign-cookies) |
## Two Pointers
| |
| ------- |
| [0019-remove-nth-node-from-end-of-list](https://github.com/nishant25kr/DSA-codes/tree/master/0019-remove-nth-node-from-end-of-list) |
| [0031-next-permutation](https://github.com/nishant25kr/DSA-codes/tree/master/0031-next-permutation) |
| [0075-sort-colors](https://github.com/nishant25kr/DSA-codes/tree/master/0075-sort-colors) |
| [0088-merge-sorted-array](https://github.com/nishant25kr/DSA-codes/tree/master/0088-merge-sorted-array) |
| [0141-linked-list-cycle](https://github.com/nishant25kr/DSA-codes/tree/master/0141-linked-list-cycle) |
| [0142-linked-list-cycle-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0142-linked-list-cycle-ii) |
| [0160-intersection-of-two-linked-lists](https://github.com/nishant25kr/DSA-codes/tree/master/0160-intersection-of-two-linked-lists) |
| [0455-assign-cookies](https://github.com/nishant25kr/DSA-codes/tree/master/0455-assign-cookies) |
| [0908-middle-of-the-linked-list](https://github.com/nishant25kr/DSA-codes/tree/master/0908-middle-of-the-linked-list) |
| [2216-delete-the-middle-node-of-a-linked-list](https://github.com/nishant25kr/DSA-codes/tree/master/2216-delete-the-middle-node-of-a-linked-list) |
| [2271-rearrange-array-elements-by-sign](https://github.com/nishant25kr/DSA-codes/tree/master/2271-rearrange-array-elements-by-sign) |
## Dynamic Programming
| |
| ------- |
| [0045-jump-game-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0045-jump-game-ii) |
| [0053-maximum-subarray](https://github.com/nishant25kr/DSA-codes/tree/master/0053-maximum-subarray) |
| [0055-jump-game](https://github.com/nishant25kr/DSA-codes/tree/master/0055-jump-game) |
| [0121-best-time-to-buy-and-sell-stock](https://github.com/nishant25kr/DSA-codes/tree/master/0121-best-time-to-buy-and-sell-stock) |
## Simulation
| |
| ------- |
| [0054-spiral-matrix](https://github.com/nishant25kr/DSA-codes/tree/master/0054-spiral-matrix) |
| [2271-rearrange-array-elements-by-sign](https://github.com/nishant25kr/DSA-codes/tree/master/2271-rearrange-array-elements-by-sign) |
## Union Find
| |
| ------- |
| [0128-longest-consecutive-sequence](https://github.com/nishant25kr/DSA-codes/tree/master/0128-longest-consecutive-sequence) |
## Linked List
| |
| ------- |
| [0019-remove-nth-node-from-end-of-list](https://github.com/nishant25kr/DSA-codes/tree/master/0019-remove-nth-node-from-end-of-list) |
| [0141-linked-list-cycle](https://github.com/nishant25kr/DSA-codes/tree/master/0141-linked-list-cycle) |
| [0142-linked-list-cycle-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0142-linked-list-cycle-ii) |
| [0160-intersection-of-two-linked-lists](https://github.com/nishant25kr/DSA-codes/tree/master/0160-intersection-of-two-linked-lists) |
| [0206-reverse-linked-list](https://github.com/nishant25kr/DSA-codes/tree/master/0206-reverse-linked-list) |
| [0237-delete-node-in-a-linked-list](https://github.com/nishant25kr/DSA-codes/tree/master/0237-delete-node-in-a-linked-list) |
| [0908-middle-of-the-linked-list](https://github.com/nishant25kr/DSA-codes/tree/master/0908-middle-of-the-linked-list) |
| [2216-delete-the-middle-node-of-a-linked-list](https://github.com/nishant25kr/DSA-codes/tree/master/2216-delete-the-middle-node-of-a-linked-list) |
## Recursion
| |
| ------- |
| [0050-powx-n](https://github.com/nishant25kr/DSA-codes/tree/master/0050-powx-n) |
| [0206-reverse-linked-list](https://github.com/nishant25kr/DSA-codes/tree/master/0206-reverse-linked-list) |
| [0231-power-of-two](https://github.com/nishant25kr/DSA-codes/tree/master/0231-power-of-two) |
## String
| |
| ------- |
| [0003-longest-substring-without-repeating-characters](https://github.com/nishant25kr/DSA-codes/tree/master/0003-longest-substring-without-repeating-characters) |
| [0020-valid-parentheses](https://github.com/nishant25kr/DSA-codes/tree/master/0020-valid-parentheses) |
| [0424-longest-repeating-character-replacement](https://github.com/nishant25kr/DSA-codes/tree/master/0424-longest-repeating-character-replacement) |
| [1460-number-of-substrings-containing-all-three-characters](https://github.com/nishant25kr/DSA-codes/tree/master/1460-number-of-substrings-containing-all-three-characters) |
## Stack
| |
| ------- |
| [0020-valid-parentheses](https://github.com/nishant25kr/DSA-codes/tree/master/0020-valid-parentheses) |
| [0094-binary-tree-inorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0094-binary-tree-inorder-traversal) |
| [0144-binary-tree-preorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0144-binary-tree-preorder-traversal) |
| [0145-binary-tree-postorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0145-binary-tree-postorder-traversal) |
## Greedy
| |
| ------- |
| [0045-jump-game-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0045-jump-game-ii) |
| [0055-jump-game](https://github.com/nishant25kr/DSA-codes/tree/master/0055-jump-game) |
| [0455-assign-cookies](https://github.com/nishant25kr/DSA-codes/tree/master/0455-assign-cookies) |
| [0890-lemonade-change](https://github.com/nishant25kr/DSA-codes/tree/master/0890-lemonade-change) |
## Sliding Window
| |
| ------- |
| [0003-longest-substring-without-repeating-characters](https://github.com/nishant25kr/DSA-codes/tree/master/0003-longest-substring-without-repeating-characters) |
| [0424-longest-repeating-character-replacement](https://github.com/nishant25kr/DSA-codes/tree/master/0424-longest-repeating-character-replacement) |
| [0966-binary-subarrays-with-sum](https://github.com/nishant25kr/DSA-codes/tree/master/0966-binary-subarrays-with-sum) |
| [1046-max-consecutive-ones-iii](https://github.com/nishant25kr/DSA-codes/tree/master/1046-max-consecutive-ones-iii) |
| [1370-count-number-of-nice-subarrays](https://github.com/nishant25kr/DSA-codes/tree/master/1370-count-number-of-nice-subarrays) |
| [1460-number-of-substrings-containing-all-three-characters](https://github.com/nishant25kr/DSA-codes/tree/master/1460-number-of-substrings-containing-all-three-characters) |
| [1538-maximum-points-you-can-obtain-from-cards](https://github.com/nishant25kr/DSA-codes/tree/master/1538-maximum-points-you-can-obtain-from-cards) |
## Prefix Sum
| |
| ------- |
| [0966-binary-subarrays-with-sum](https://github.com/nishant25kr/DSA-codes/tree/master/0966-binary-subarrays-with-sum) |
| [1046-max-consecutive-ones-iii](https://github.com/nishant25kr/DSA-codes/tree/master/1046-max-consecutive-ones-iii) |
| [1370-count-number-of-nice-subarrays](https://github.com/nishant25kr/DSA-codes/tree/master/1370-count-number-of-nice-subarrays) |
| [1538-maximum-points-you-can-obtain-from-cards](https://github.com/nishant25kr/DSA-codes/tree/master/1538-maximum-points-you-can-obtain-from-cards) |
## Divide and Conquer
| |
| ------- |
| [0053-maximum-subarray](https://github.com/nishant25kr/DSA-codes/tree/master/0053-maximum-subarray) |
| [0169-majority-element](https://github.com/nishant25kr/DSA-codes/tree/master/0169-majority-element) |
## Counting
| |
| ------- |
| [0169-majority-element](https://github.com/nishant25kr/DSA-codes/tree/master/0169-majority-element) |
| [0229-majority-element-ii](https://github.com/nishant25kr/DSA-codes/tree/master/0229-majority-element-ii) |
## Matrix
| |
| ------- |
| [0048-rotate-image](https://github.com/nishant25kr/DSA-codes/tree/master/0048-rotate-image) |
| [0054-spiral-matrix](https://github.com/nishant25kr/DSA-codes/tree/master/0054-spiral-matrix) |
| [0073-set-matrix-zeroes](https://github.com/nishant25kr/DSA-codes/tree/master/0073-set-matrix-zeroes) |
## Tree
| |
| ------- |
| [0094-binary-tree-inorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0094-binary-tree-inorder-traversal) |
| [0100-same-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0100-same-tree) |
| [0101-symmetric-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0101-symmetric-tree) |
| [0102-binary-tree-level-order-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0102-binary-tree-level-order-traversal) |
| [0103-binary-tree-zigzag-level-order-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0103-binary-tree-zigzag-level-order-traversal) |
| [0104-maximum-depth-of-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0104-maximum-depth-of-binary-tree) |
| [0144-binary-tree-preorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0144-binary-tree-preorder-traversal) |
| [0145-binary-tree-postorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0145-binary-tree-postorder-traversal) |
| [0199-binary-tree-right-side-view](https://github.com/nishant25kr/DSA-codes/tree/master/0199-binary-tree-right-side-view) |
| [0236-lowest-common-ancestor-of-a-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0236-lowest-common-ancestor-of-a-binary-tree) |
| [0543-diameter-of-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0543-diameter-of-binary-tree) |
## Depth-First Search
| |
| ------- |
| [0094-binary-tree-inorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0094-binary-tree-inorder-traversal) |
| [0100-same-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0100-same-tree) |
| [0101-symmetric-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0101-symmetric-tree) |
| [0104-maximum-depth-of-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0104-maximum-depth-of-binary-tree) |
| [0144-binary-tree-preorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0144-binary-tree-preorder-traversal) |
| [0145-binary-tree-postorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0145-binary-tree-postorder-traversal) |
| [0199-binary-tree-right-side-view](https://github.com/nishant25kr/DSA-codes/tree/master/0199-binary-tree-right-side-view) |
| [0236-lowest-common-ancestor-of-a-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0236-lowest-common-ancestor-of-a-binary-tree) |
| [0543-diameter-of-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0543-diameter-of-binary-tree) |
## Binary Tree
| |
| ------- |
| [0094-binary-tree-inorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0094-binary-tree-inorder-traversal) |
| [0100-same-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0100-same-tree) |
| [0101-symmetric-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0101-symmetric-tree) |
| [0102-binary-tree-level-order-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0102-binary-tree-level-order-traversal) |
| [0103-binary-tree-zigzag-level-order-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0103-binary-tree-zigzag-level-order-traversal) |
| [0104-maximum-depth-of-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0104-maximum-depth-of-binary-tree) |
| [0144-binary-tree-preorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0144-binary-tree-preorder-traversal) |
| [0145-binary-tree-postorder-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0145-binary-tree-postorder-traversal) |
| [0199-binary-tree-right-side-view](https://github.com/nishant25kr/DSA-codes/tree/master/0199-binary-tree-right-side-view) |
| [0236-lowest-common-ancestor-of-a-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0236-lowest-common-ancestor-of-a-binary-tree) |
| [0543-diameter-of-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0543-diameter-of-binary-tree) |
## Breadth-First Search
| |
| ------- |
| [0100-same-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0100-same-tree) |
| [0101-symmetric-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0101-symmetric-tree) |
| [0102-binary-tree-level-order-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0102-binary-tree-level-order-traversal) |
| [0103-binary-tree-zigzag-level-order-traversal](https://github.com/nishant25kr/DSA-codes/tree/master/0103-binary-tree-zigzag-level-order-traversal) |
| [0104-maximum-depth-of-binary-tree](https://github.com/nishant25kr/DSA-codes/tree/master/0104-maximum-depth-of-binary-tree) |
| [0199-binary-tree-right-side-view](https://github.com/nishant25kr/DSA-codes/tree/master/0199-binary-tree-right-side-view) |