Skip to content

Solution to LeetCode

Notifications You must be signed in to change notification settings

bunu23/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions (JAVA)

Table of Contents

  1. Easy

  2. Medium

  3. Hard


🟢 Easy

#ProblemSolutionType
1Reverse Linked ListSolutionLinkedList
2Merge Two Sorted ListsSolutionLinkedList
3Palindrome Linked ListSolutionLinkedList
4Remove DuplicatesSolutionLinkedList
5 Linked List CycleSolutionLinkedList
6 Intersection of Two Linked ListsSolutionLinkedList
7Remove Linked List ElementsSolutionLinkedList
8Middle of Linked ListSolutionLinkedList
9Minimum String Length After Removing SubstringsSolutionStack
10Binary Tree InOrder TraversalSolutionStack, Tree
11Binary Tree Preorder TraversalSolutionStack, Tree
12Binary Tree Postorder TraversalSolutionStack, Tree
13Minimum Number of Swaps to Make the String BalancedSolutionStack, String,Two Pointer
14 Palindrome NumberSolutionMath
15 Majority ElementSolutionArray
16 Missing NumberSolutionArray
17 Move ZeroesSolutionArray
18 Roman to IntegerSolutionString
19Longest Common PrefixSolutionString
20Valid ParenthesisSolutionString , Stack
21Find the Index of the First Occurrence in a StringSolutionString
22Length of Last WordSolutionString
23 Add BinarySolutionString
24 Valid PalindromeSolutionString
25Excel Sheet Column TitleSolutionString
26Excel Sheet Column NumberSolutionString
27Valid AnagramSolutionString
28Binary Tree PathsSolutionString
29Contains DuplicateSolutionHashSet, Array

Back to TOC


🟠 Medium

#ProblemSolutionType
1Add Two NumbersSolutionLinkedList
2Delete Nodes from Linked List Present in ArraySolutionLinkedList
3Minimum Add to Make Parentheses ValidSolutionString, Stack
4Maximum Width RampSolutionArray, Stack
5The Number of the Smallest Unoccupied ChairSolutionArrayList, Priority Queue (Min-Heap)
6Separate Black and White BallsSolutionString
7Longest Square Streak in an ArraySolutionArray, HashMap
8 Product of Array Except SelfSolutionArray

Back to TOC


🔴 Hard

#ProblemSolutionType
1First Missing PositiveSolutionArrays

Back to TOC


Directory Structure

📂 project-root ├── 📂 easy │ ├── 📂 TwoSum │ │ └── Solution.java │ ├── 📂 ValidPalindrome │ └── Solution.java ├── 📂 medium │ ├── 📂 AddTwoNumbers │ │ └── Solution.java │ ├── 📂 LongestSubstring │ └── Solution.java ├── 📂 hard │ ├── 📂 MedianSortedArrays │ │ └── Solution.java │ ├── 📂 RegexMatching │ └── Solution.java └── README.md 
close