Skip to content

Rina-V09/LeetCode-Solutions-JAVA-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

811 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode-Solutions

This repository contains my solutions to a wide range of LeetCode problems, implemented in Java.
The solutions are categorized by topic to make it easier for learners and developers to find problems relevant to specific concepts such as Arrays, Strings, Dynamic Programming, Trees, Graphs, etc.

Key Features

  • All problems solved in Java with clear and optimized approaches.
  • Categorized by LeetCode tags/topics for easy navigation.
  • Direct links to each problem’s solution folder.
  • Includes problems of varying difficulty levels (Easy, Medium, Hard).

LeetCode Topics

Array

Problem
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0037-sudoku-solver
0039-combination-sum
0051-n-queens
0056-merge-intervals
0057-insert-interval
0074-search-a-2d-matrix
0078-subsets
0079-word-search
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0174-dungeon-game
0200-number-of-islands
0300-longest-increasing-subsequence
0322-coin-change
0518-coin-change-ii
0540-single-element-in-a-sorted-array
0594-longest-harmonious-subsequence
0733-flood-fill
0907-koko-eating-bananas
0934-bitwise-ors-of-subarrays
1036-rotting-oranges
1137-height-checker
1350-remove-sub-folders-from-the-filesystem
1352-maximum-profit-in-job-scheduling
1478-maximum-number-of-events-that-can-be-attended
1510-find-lucky-integer-in-an-array
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1813-maximum-erasure-value
1851-maximum-number-of-events-that-can-be-attended-ii
1995-finding-pairs-with-a-certain-sum
2079-delete-duplicate-folders-in-system
2150-kth-smallest-product-of-two-sorted-arrays
2170-count-number-of-maximum-bitwise-or-subsets
2204-find-subsequence-of-length-k-with-the-largest-sum
2267-minimum-difference-in-sums-after-removal-of-elements
2320-find-all-k-distant-indices-in-an-array
2479-meeting-rooms-iii
2497-maximum-matching-of-players-with-trainers
2498-smallest-subarrays-with-maximum-bitwise-or
2503-longest-subarray-with-maximum-bitwise-and
2689-rearranging-fruits
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3741-reschedule-meetings-for-maximum-free-time-ii
3743-reschedule-meetings-for-maximum-free-time-i
3788-maximum-unique-subarray-sum-after-deletion
3789-maximize-subarrays-after-removing-one-conflicting-pair

Sorting

Problem
0056-merge-intervals
0594-longest-harmonious-subsequence
1137-height-checker
1352-maximum-profit-in-job-scheduling
1478-maximum-number-of-events-that-can-be-attended
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1851-maximum-number-of-events-that-can-be-attended-ii
2204-find-subsequence-of-length-k-with-the-largest-sum
2479-meeting-rooms-iii
2497-maximum-matching-of-players-with-trainers
2689-rearranging-fruits

Counting Sort

Problem
0594-longest-harmonious-subsequence
1137-height-checker
1510-find-lucky-integer-in-an-array
2140-longest-subsequence-repeated-k-times

Backtracking

Problem
0037-sudoku-solver
0039-combination-sum
0051-n-queens
0078-subsets
0079-word-search
0813-all-paths-from-source-to-target
2140-longest-subsequence-repeated-k-times
2170-count-number-of-maximum-bitwise-or-subsets

Two Pointers

Problem
0005-longest-palindromic-substring
0019-remove-nth-node-from-end-of-list
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
2320-find-all-k-distant-indices-in-an-array
2497-maximum-matching-of-players-with-trainers

Binary Search

Problem
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0300-longest-increasing-subsequence
0540-single-element-in-a-sorted-array
0907-koko-eating-bananas
1352-maximum-profit-in-job-scheduling
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1851-maximum-number-of-events-that-can-be-attended-ii
2150-kth-smallest-product-of-two-sorted-arrays
2498-smallest-subarrays-with-maximum-bitwise-or

Matrix

Problem
0037-sudoku-solver
0074-search-a-2d-matrix
0079-word-search
0174-dungeon-game
0200-number-of-islands
0733-flood-fill
1036-rotting-oranges

String

Problem
0005-longest-palindromic-substring
0013-roman-to-integer
0079-word-search
0091-decode-ways
1093-recover-a-tree-from-preorder-traversal
1250-longest-common-subsequence
1302-delete-characters-to-make-fancy-string
1350-remove-sub-folders-from-the-filesystem
1818-maximum-score-from-removing-substrings
2079-delete-duplicate-folders-in-system
2140-longest-subsequence-repeated-k-times
2395-longest-binary-subsequence-less-than-or-equal-to-k
3396-valid-word
3617-find-the-original-typed-string-i
3618-find-the-original-typed-string-ii

Dynamic Programming

Problem
0005-longest-palindromic-substring
0091-decode-ways
0152-maximum-product-subarray
0174-dungeon-game
0279-perfect-squares
0300-longest-increasing-subsequence
0322-coin-change
0518-coin-change-ii
0934-bitwise-ors-of-subarrays
1008-binary-tree-cameras
1250-longest-common-subsequence
1263-number-of-dice-rolls-with-target-sum
1352-maximum-profit-in-job-scheduling
1851-maximum-number-of-events-that-can-be-attended-ii
2028-the-earliest-and-latest-rounds-where-players-compete
2267-minimum-difference-in-sums-after-removal-of-elements
2395-longest-binary-subsequence-less-than-or-equal-to-k
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3618-find-the-original-typed-string-ii

Greedy

Problem
1478-maximum-number-of-events-that-can-be-attended
1818-maximum-score-from-removing-substrings
2140-longest-subsequence-repeated-k-times
2395-longest-binary-subsequence-less-than-or-equal-to-k
2497-maximum-matching-of-players-with-trainers
2689-rearranging-fruits
3741-reschedule-meetings-for-maximum-free-time-ii
3743-reschedule-meetings-for-maximum-free-time-i
3788-maximum-unique-subarray-sum-after-deletion

Memoization

Problem
2028-the-earliest-and-latest-rounds-where-players-compete
2395-longest-binary-subsequence-less-than-or-equal-to-k

Stack

Problem
0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
1818-maximum-score-from-removing-substrings

Tree

Problem
0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
Problem
-------
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0404-sum-of-left-leaves
0543-diameter-of-binary-tree
0671-second-minimum-node-in-a-binary-tree
1008-binary-tree-cameras
1093-recover-a-tree-from-preorder-traversal

Depth-First Search

Problem
0079-word-search
0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0404-sum-of-left-leaves
0543-diameter-of-binary-tree
0547-number-of-provinces
0671-second-minimum-node-in-a-binary-tree
0733-flood-fill
0813-all-paths-from-source-to-target
1008-binary-tree-cameras
1093-recover-a-tree-from-preorder-traversal
1350-remove-sub-folders-from-the-filesystem

Binary Tree

Problem
0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0404-sum-of-left-leaves
0543-diameter-of-binary-tree
0671-second-minimum-node-in-a-binary-tree
1008-binary-tree-cameras
1093-recover-a-tree-from-preorder-traversal

Breadth-First Search

Problem
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0279-perfect-squares
0322-coin-change
0404-sum-of-left-leaves
0547-number-of-provinces
0733-flood-fill
0813-all-paths-from-source-to-target
1036-rotting-oranges

Enumeration

Problem
2140-longest-subsequence-repeated-k-times
2170-count-number-of-maximum-bitwise-or-subsets
3741-reschedule-meetings-for-maximum-free-time-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair

Hash Table

Problem
0013-roman-to-integer
0037-sudoku-solver
0594-longest-harmonious-subsequence
1510-find-lucky-integer-in-an-array
1813-maximum-erasure-value
1995-finding-pairs-with-a-certain-sum
2079-delete-duplicate-folders-in-system
2204-find-subsequence-of-length-k-with-the-largest-sum
2479-meeting-rooms-iii
2689-rearranging-fruits
3788-maximum-unique-subarray-sum-after-deletion

Heap (Priority Queue)

Problem
1478-maximum-number-of-events-that-can-be-attended
2204-find-subsequence-of-length-k-with-the-largest-sum
2267-minimum-difference-in-sums-after-removal-of-elements
2479-meeting-rooms-iii

Sliding Window

Problem
0594-longest-harmonious-subsequence
1813-maximum-erasure-value
2498-smallest-subarrays-with-maximum-bitwise-or
3743-reschedule-meetings-for-maximum-free-time-i

Union Find

Problem
0200-number-of-islands
0547-number-of-provinces

Graph

Problem
0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0813-all-paths-from-source-to-target

Prefix Sum

Problem
3618-find-the-original-typed-string-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair

Math

Problem
0013-roman-to-integer
0279-perfect-squares
1411-convert-binary-number-in-a-linked-list-to-integer
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii

Topological Sort

Problem
0207-course-schedule
0210-course-schedule-ii

Bit Manipulation

Problem
0078-subsets
0934-bitwise-ors-of-subarrays
2170-count-number-of-maximum-bitwise-or-subsets
2498-smallest-subarrays-with-maximum-bitwise-or
2503-longest-subarray-with-maximum-bitwise-and
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii

Recursion

Problem
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii

Simulation

Problem
2479-meeting-rooms-iii
3600-find-the-k-th-character-in-string-game-i

Design

Problem
1995-finding-pairs-with-a-certain-sum

Linked List

Problem
0019-remove-nth-node-from-end-of-list
0237-delete-node-in-a-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer

Trie

Problem
1350-remove-sub-folders-from-the-filesystem
2079-delete-duplicate-folders-in-system

Hash Function

Problem
2079-delete-duplicate-folders-in-system

Segment Tree

Problem
3789-maximize-subarrays-after-removing-one-conflicting-pair

Brainteaser

Problem
2503-longest-subarray-with-maximum-bitwise-and

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors