This repository contains solutions to various data structures and algorithms practice questions from LeetCode and GeeksforGeeks. Each problem is solved in C++, and the solutions are organized for each questions separately.
0014-longest-common-prefix |
0648-replace-words |
0061-rotate-list |
0083-remove-duplicates-from-sorted-list |
0148-sort-list |
0012-integer-to-roman |
0067-add-binary |
0171-excel-sheet-column-number |
0523-continuous-subarray-sum |
0633-sum-of-square-numbers |
1370-count-number-of-nice-subarrays |
0523-continuous-subarray-sum |
1016-subarray-sums-divisible-by-k |
1037-minimum-number-of-k-consecutive-bit-flips |
0561-array-partition |
0948-sort-an-array |
0982-minimum-increment-to-make-array-unique |
1137-height-checker |
1217-relative-sort-array |
0108-convert-sorted-array-to-binary-search-tree |
0148-sort-list |
0948-sort-an-array |
1285-balance-a-binary-search-tree |
0502-ipo |
0948-sort-an-array |
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit |
0148-sort-list |
0948-sort-an-array |
0948-sort-an-array |
0948-sort-an-array |
0020-valid-parentheses |
0094-binary-tree-inorder-traversal |
0067-add-binary |
1037-minimum-number-of-k-consecutive-bit-flips |
0067-add-binary |
0100-same-tree |
0104-maximum-depth-of-binary-tree |
0111-minimum-depth-of-binary-tree |
0112-path-sum |
1037-minimum-number-of-k-consecutive-bit-flips |
1138-grumpy-bookstore-owner |
1370-count-number-of-nice-subarrays |
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit |
1037-minimum-number-of-k-consecutive-bit-flips |
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit |
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit |
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit |
0108-convert-sorted-array-to-binary-search-tree |
0538-convert-bst-to-greater-tree |
1114-binary-search-tree-to-greater-sum-tree |
1285-balance-a-binary-search-tree |
1916-find-center-of-star-graph |
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph |
2472-build-a-matrix-with-conditions |
0219-contains-duplicate-ii |
2255-minimum-swaps-to-group-all-1s-together-ii |
1786-count-the-number-of-consistent-strings |
2163-kth-distinct-string-in-an-array |
2331-intersection-of-multiple-arrays |
3276-minimum-number-of-pushes-to-type-word-ii |
0040-combination-sum-ii |
0089-gray-code |
0273-integer-to-english-words |
1013-fibonacci-number |
1951-find-the-winner-of-the-circular-game |
1951-find-the-winner-of-the-circular-game |
0278-first-bad-version |
0948-sort-an-array |
0264-ugly-number-ii |
0948-sort-an-array |
1325-path-with-maximum-probability |
2803-modify-graph-edge-weights |
0948-sort-an-array |
0948-sort-an-array |
0948-sort-an-array |
0948-sort-an-array |
1325-path-with-maximum-probability |
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance |
2171-second-minimum-time-to-reach-destination |
2803-modify-graph-edge-weights |
1511-count-number-of-teams |
0999-regions-cut-by-slashes |
2035-count-sub-islands |
1691-minimum-number-of-days-to-disconnect-island |
1240-stone-game-ii |
1435-xor-queries-of-a-subarray |
2006-find-the-student-that-will-replace-the-chalk |
1240-stone-game-ii |
2903-insert-greatest-common-divisors-in-linked-list |
1013-fibonacci-number |
2503-longest-subarray-with-maximum-bitwise-and |