Skip to content

sth4rley/leetcode

Repository files navigation

leetcode

My Solutions for LeetCode Challenges

Array / String

  • Merge Sorted Array
  • Remove Element
  • Remove Duplicates from Sorted Array
  • Remove Duplicates from Sorted Array II
  • Majority Element
  • Rotate Array
  • Best Time to Buy and Sell Stock
  • Best Time to Buy and Sell Stock II
  • Find Words Containing
  • Jump Game
  • Jump Game II
  • H-Index
  • Insert Delete GetRandom O(1)
  • Product of Array Except Self
  • Gas Station
  • Roman to Integer
  • Integer to Roman
  • Shuffle String
  • Length of Last Word
  • Longest Common Prefix
  • Reverse Words in a String
  • Minimum Operations to Make the Array Increasing
  • Zigzag Conversion
  • Find the Index of the First Occurrence in a String
  • Single Number I
  • Single Number II

Two Pointers

  • Valid Palindrome
  • Is Subsequence
  • Two Sum II - Input Array Is Sorted
  • Container With Most Water
  • 3Sum

Sliding Window

  • Minimum Size Subarray Sum
  • Longest Substring Without Repeating Characters

Matrix

  • Rotate Image
  • Valid Sudoku

Hashmap

  • Ransom Note
  • Isomorphic Strings
  • Word Pattern
  • Two Sum
  • Valid Anagram
  • Group Anagrams
  • Contains Duplicate II
  • Find the Difference of Two Arrays

Intervals

  • Summary Ranges
  • Merge Intervals
  • Insert Interval
  • Minimum Number of Arrows to Burst Balloons

Stack

  • Valid Parentheses
  • Simplify Path
  • Min Stack
  • Evaluate Reverse Polish Notation

Linked List

  • Linked List Cycle
  • Swap Pairs ***
  • Add Two Numbers
  • Middle of Linked List
  • Palindrome Linked List
  • Lexicographically Smallest Palindrome
  • Merge Two Sorted Lists
  • Copy List with Random Pointer
  • Reverse Linked List II
  • Remove Nth Node From End of List
  • Remove Duplicates from Sorted List II
  • Rotate List
  • Partition List
  • LRU Cache

Binary Tree General

  • Maximum Depth of Binary Tree
  • Same Tree
  • Invert Binary Tree
  • Symmetric Tree
  • ...

Binary Tree BFS

  • Average of Levels in Binary Tree
  • ...

Binary Search Tree

  • Minimum Absolute Difference in BST
  • ...

Graph General

  • Number of Islands
  • Surrounded Regions
  • Clone Graph
  • Evaluate Division
  • Course Schedule
  • Course Schedule II ...

Graph BFS

  • Snakes and Ladders
  • Minimum Genetic Mutation

Trie

  • Implement Trie (Prefix Tree)
  • Design Add and Search Words Data Structure

Backtracking

...

Divide & Conquer

  • Convert Sorted Array to Binary Search Tree
  • ...

Kadane's Algorithm

  • Maximum Subarray
  • Maximum Sum Circular Subarray

Binary Search

  • Search Insert Position
  • ...

Binary Search

  • Search Insert Position
  • ...

Heap

...

Bit Manipulation

  • Add Binary
  • Reverse Bits
  • Number of 1 Bits
  • Single Number
  • ...

Math

  • Palindrome Number
  • Plus One
  • Sqrt(x)
  • ...

1D DP

  • Climbing Stairs
  • Fibonacci Number
  • N-th Tribonacci
  • Min Cost Climbing Stairs
  • House Robber
  • Word Break
  • Coin Change
  • Longest Increasing Subsequence

Multidimensional DP

...

About

My Solutions for LeetCode Challenges

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages