Skip to content

Latest commit

 

History

275 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA-in-Java

This repository contains my Java solutions to LeetCode Data Structures and Algorithms problems. Problems focusing on efficient approaches, time and space complexity, and consistent coding practices to improve problem-solving skills.

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0018-4sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0031-next-permutation
0040-combination-sum-ii
0045-jump-game-ii
0055-jump-game
0057-insert-interval
0078-subsets
0085-maximal-rectangle
0135-candy
0152-maximum-product-subarray
0455-assign-cookies
0503-next-greater-element-ii
0621-task-scheduler
0875-koko-eating-bananas
0877-stone-game
0992-subarrays-with-k-different-integers
1004-max-consecutive-ones-iii
1464-maximum-product-of-two-elements-in-an-array
1848-minimum-distance-to-the-target-element
1901-find-a-peak-element-ii

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0076-minimum-window-substring
0141-linked-list-cycle
0355-design-twitter
0451-sort-characters-by-frequency
0621-task-scheduler
0992-subarrays-with-k-different-integers

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0992-subarrays-with-k-different-integers
1004-max-consecutive-ones-iii

Counting

0451-sort-characters-by-frequency
0621-task-scheduler
0992-subarrays-with-k-different-integers

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0008-string-to-integer-atoi
0013-roman-to-integer
0014-longest-common-prefix
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0076-minimum-window-substring
0125-valid-palindrome
0151-reverse-words-in-a-string
0451-sort-characters-by-frequency
0678-valid-parenthesis-string
1614-maximum-nesting-depth-of-the-parentheses
3517-smallest-palindromic-rearrangement-i

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0045-jump-game-ii
0055-jump-game
0085-maximal-rectangle
0152-maximum-product-subarray
0678-valid-parenthesis-string
0877-stone-game

Stack

0020-valid-parentheses
0085-maximal-rectangle
0225-implement-stack-using-queues
0503-next-greater-element-ii
0589-n-ary-tree-preorder-traversal
0678-valid-parenthesis-string
1614-maximum-nesting-depth-of-the-parentheses

Matrix

0085-maximal-rectangle
1901-find-a-peak-element-ii

Monotonic Stack

0085-maximal-rectangle
0503-next-greater-element-ii

Sorting

0015-3sum
0018-4sum
0295-find-median-from-data-stream
0451-sort-characters-by-frequency
0455-assign-cookies
0621-task-scheduler
1464-maximum-product-of-two-elements-in-an-array
3517-smallest-palindromic-rearrangement-i

Heap (Priority Queue)

0023-merge-k-sorted-lists
0295-find-median-from-data-stream
0355-design-twitter
0451-sort-characters-by-frequency
0621-task-scheduler
0703-kth-largest-element-in-a-stream
1464-maximum-product-of-two-elements-in-an-array

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0018-4sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0031-next-permutation
0061-rotate-list
0125-valid-palindrome
0141-linked-list-cycle
0151-reverse-words-in-a-string
0295-find-median-from-data-stream
0455-assign-cookies

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0025-reverse-nodes-in-k-group
0061-rotate-list
0141-linked-list-cycle
0237-delete-node-in-a-linked-list
0328-odd-even-linked-list
0355-design-twitter

Counting Sort

3517-smallest-palindromic-rearrangement-i

Divide and Conquer

0004-median-of-two-sorted-arrays
0023-merge-k-sorted-lists

Merge Sort

0023-merge-k-sorted-lists

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string

Z Algorithm

0028-find-the-index-of-the-first-occurrence-in-a-string

Knuth–Morris–Pratt Algorithm

0028-find-the-index-of-the-first-occurrence-in-a-string

Boyer–Moore String-Search Algorithm

0028-find-the-index-of-the-first-occurrence-in-a-string

Math

0002-add-two-numbers
0009-palindrome-number
0013-roman-to-integer
0877-stone-game

Minimax

0877-stone-game

Game Theory

0877-stone-game

Zero-Sum Game

0877-stone-game

Design

0225-implement-stack-using-queues
0295-find-median-from-data-stream
0355-design-twitter
0703-kth-largest-element-in-a-stream

Tree

0102-binary-tree-level-order-traversal
0589-n-ary-tree-preorder-traversal
0703-kth-largest-element-in-a-stream

Binary Search Tree

0004-median-of-two-sorted-arrays
0703-kth-largest-element-in-a-stream
0875-koko-eating-bananas
1004-max-consecutive-ones-iii
1901-find-a-peak-element-ii

Binary Tree

0102-binary-tree-level-order-traversal
0703-kth-largest-element-in-a-stream

Data Stream

0295-find-median-from-data-stream
0703-kth-largest-element-in-a-stream

Greedy

0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0135-candy
0455-assign-cookies
0621-task-scheduler
0678-valid-parenthesis-string

Quicksort

0455-assign-cookies

Bracket Sequences

0020-valid-parentheses
0022-generate-parentheses
0678-valid-parenthesis-string

Floyd's Cycle Finding Algorithm

0141-linked-list-cycle

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0040-combination-sum-ii
0078-subsets

Depth-First Search

0589-n-ary-tree-preorder-traversal

Manacher

0005-longest-palindromic-substring

Trie

0014-longest-common-prefix

Bit Manipulation

0078-subsets

Breadth-First Search

0102-binary-tree-level-order-traversal

Prefix Sum

1004-max-consecutive-ones-iii

Queue

0225-implement-stack-using-queues

Bucket Sort

0451-sort-characters-by-frequency

About

This repository contains my Java solutions to LeetCode Data Structures and Algorithms problems. Problems focusing on efficient approaches, time and space complexity, and consistent coding practices to improve problem-solving skills.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages