This repository contains my solutions to various problems I have solved on LeetCode. Each solution is accompanied by the problem statement and is implemented in an optimized manner.
Each problem is categorized based on DSA / SQL.
The solutions are implemented in Java for DSA and SQL for database related problems.
Every solution includes a well-structured explanation and comments.
Clone the repository:
git clone https://github.com/tejasvi001/LeetcodeProblemsSolved.git
Navigate to the required topic folder.
Open the problem file to see the solution and explanation.
| 0014-longest-common-prefix |
| 0139-word-break |
| 0208-implement-trie-prefix-tree |
| 0028-find-the-index-of-the-first-occurrence-in-a-string |
| 0572-subtree-of-another-tree |
| 0812-rotate-string |
| 0070-climbing-stairs |
| 0139-word-break |
| 1013-fibonacci-number |
| 1236-n-th-tribonacci-number |
| 3140-count-visited-nodes-in-a-directed-graph |
| 0204-count-primes |
| 0258-add-digits |
| 2507-number-of-common-factors |
| 2722-prime-in-diagonal |
| 3914-check-if-any-element-has-prime-frequency |
| 0042-trapping-rain-water |
| 0084-largest-rectangle-in-histogram |
| 0496-next-greater-element-i |
| 0503-next-greater-element-ii |
| 0739-daily-temperatures |
| 0937-online-stock-span |
| 0295-find-median-from-data-stream |
| 0789-kth-largest-element-in-a-stream |
| 0937-online-stock-span |
| 0969-number-of-recent-calls |
| 0374-guess-number-higher-or-lower |
| 0239-sliding-window-maximum |
| 0954-maximum-sum-circular-subarray |
| 0572-subtree-of-another-tree |
| 0718-maximum-length-of-repeated-subarray |
| 0816-design-hashset |
| 0817-design-hashmap |
| 0215-kth-largest-element-in-an-array |
| 0347-top-k-frequent-elements |
| 1860-find-kth-largest-xor-coordinate-value |
| 2113-find-the-kth-largest-integer-in-the-array |
| 0347-top-k-frequent-elements |
| 0451-sort-characters-by-frequency |
| 0023-merge-k-sorted-lists |
| 0148-sort-list |
| 0204-count-primes |
| 0875-longest-mountain-in-array |
| 0900-reordered-power-of-2 |
| 2507-number-of-common-factors |
| 3277-find-the-number-of-ways-to-place-people-ii |
| 3278-find-the-number-of-ways-to-place-people-i |
| 0207-course-schedule |
| 0210-course-schedule-ii |
| 0801-is-graph-bipartite |
| 2121-find-if-path-exists-in-graph |
| 3140-count-visited-nodes-in-a-directed-graph |
| 3838-path-existence-queries-in-a-graph-i |
| 0801-is-graph-bipartite |
| 2121-find-if-path-exists-in-graph |
| 3838-path-existence-queries-in-a-graph-i |
| 0207-course-schedule |
| 0210-course-schedule-ii |
| 0022-generate-parentheses |
| 0037-sudoku-solver |
| 0046-permutations |
| 0047-permutations-ii |
| 0051-n-queens |
| 0052-n-queens-ii |
| 0078-subsets |
| 0494-target-sum |
| 2148-minimum-number-of-moves-to-seat-everyone |
| 0593-valid-square |
| 3277-find-the-number-of-ways-to-place-people-ii |
| 3278-find-the-number-of-ways-to-place-people-i |
| 0173-binary-search-tree-iterator |
| 0146-lru-cache |
| 0062-unique-paths |
| 3462-vowels-game-in-a-string |
| 3462-vowels-game-in-a-string |
| 3678-design-task-manager |
| 3827-implement-router |
| 0718-maximum-length-of-repeated-subarray |