📄️ 0001 - Two Sum
This is a solution to the Two Sum problem on LeetCode.
📄️ 0002 - Add Two Numbers
This is a solution to the Add Two Numbers problem on LeetCode.
📄️ 0003 - Longest Substring Without Repeating Characters
This is a solution to the Longest Substring Without Repeating Characters problem on LeetCode.
📄️ 0004 - Median of Two Sorted Arrays
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
📄️ 0005-Longest Palindrome Substring
Given a string s, return the longest palindromic substring in s.
📄️ 0006-Zigzag Conversion
Convert the given string into a zigzag pattern with a specified number of rows.
📄️ 0007-Reverse Integer
Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 - 1], then return 0.
📄️ 0008-String to Integer
Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer.
📄️ 0009 - Palindrome Number
Given an integer x, return true if x is a palindrome, and false otherwise.
📄️ 0010 - Regular Expression Matching
Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where '.' matches any single character and '*' matches zero or more of the preceding element.
📄️ 0011 - Container With Most Water
Given n non-negative integers representing the heights of vertical lines, find the two lines that together with the x-axis form a container, such that the container contains the most water.
📄️ 0012 - Integer to Roman
Convert a given integer to a Roman numeral using specific rules for the Roman numeral system.
📄️ 0013 - Roman to Integer
Convert a given Roman numeral to an integer using specific rules for the Roman numeral system.
📄️ 0014-Longest Comman Prefix
finds logest comman prefix for a given string.
📄️ 0015-3Sum
find the number of triplets with given sum .
📄️ 0016-3Sum Closest
Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target.
📄️ 0017 - letter-combination
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.
📄️ 0018-4Sum
Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]]
📄️ 0019-remove-nth-node-from-end-of-list
Given the head of a linked list, remove the nth node from the end of the list and return its head.
📄️ 0020-valid-parentheses
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
📄️ 0021-MergeTwoSortedLists
Given two sorted linked lists, merge them into a single sorted linked list.
📄️ 0022-Generate-Parentheses
This is a solution to the Generate Parentheses problem on LeetCode.
📄️ 0023-Merge-k-sorted-list
The given code provides a solution to merge k sorted linked lists into one sorted linked list. The approach used is a divide-and-conquer strategy.
📄️ 0024-SwapNodesInPairs
Swap every two adjacent nodes in a linked list and return its head. The values in the nodes must not be modified, only the nodes themselves can be changed.
📄️ 0025-ReverseNodesInK-Group
Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes, in the end, should remain as it is.You may not alter the values in the list's nodes, only nodes themselves may be changed.
📄️ 0026-RemoveDuplicatesFromSortedArray
Given a sorted integer array, remove duplicates in-place and return the new length of the array with unique elements.
📄️ 0027-RemoveElement
Problem Description
📄️ 0028-FindFirstOccurrenceInString
Problem Description
📄️ 0029-DivideTwoIntegers
Divide two integers without using multiplication, division, and mod operator. The integer division should truncate toward zero.
📄️ 0030-Substring-with-Concatenation-of-All-Words
A concatenated string is a string that exactly contains all the strings of any permutation of `words` concatenated.
📄️ 0031-NextPermutation
Find the next lexicographically greater permutation of an array of integers. The replacement must be in place and use only constant extra memory.
📄️ 0032 longest-valid-parentheses
This is a solution to the longest-valid-parentheses on LeetCode
📄️ 0033-SearchInRotatedSortedArray
Search for a target element in a rotated sorted array with distinct values using an algorithm with O(log n) runtime complexity.
📄️ 0034-Find First and Last Position of Element in Sorted Array
Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value.
📄️ 0035-SearchInsertPosition
Problem Description
📄️ 0036-ValidSudoku
Problem Description
📄️ 0037-ValidSudoku
Problem Description
📄️ 0038-CountAndSay
Problem Description
📄️ 0039-Combination Sum
Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target.
📄️ 0040-Combination Sum-II
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target.
📄️ 0041-First Missing Positive
Find the smallest missing positive integer.
📄️ 0042-Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
📄️ 0043-Multiple-Strings
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.
📄️ 44 Wildcard Matching
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*' where.
📄️ 0045-Jump-Game-II
You are given a 0-indexed array of integers nums of length `n`. Return the minimum number of jumps to reach `nums[n - 1]`.
📄️ 0046-Permutations
Given an array `nums` of distinct integers, return all the possible permutations. You can return the answer in any order.
📄️ 0047-Permutations 2
Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.
📄️ 0048-RotateImage
given an 2D matrix which is representing an image, rotate the image by 90 degrees.
📄️ 0049-Group Anagrams
Given an array of strings , group the anagrams together.
📄️ 0050-powxn
Problem Description
📄️ N-Queens Puzzle
The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.
📄️ 0052-N-queens-2
The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.
📄️ 0053-MaximumSubarray
Given an integer array nums, find the subarray with the largest sum, and return its sum.
📄️ 0054-Spiral-Matrix
This document provides a solution to the Spiral Matrix problem, where the goal is to traverse a matrix in spiral order.
📄️ 0055 - Jump-Game
You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position.
📄️ 0056-Merge Intervals
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.
📄️ 0057-Insert Interval
You are given an array of non-overlapping intervals intervals. Insert newInterval into intervals such that intervals is still sorted in ascending order by starti and intervals still does not have any overlapping intervals. Return intervals after the insertion.
📄️ 0058-LengthOfLastWord
Problem Description
📄️ 0059-Spiral Matrix II
Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order.
📄️ 0060-Permutation Sequence
The set [1, 2, 3, ..., n] contains a total of n! unique permutations. Given n and k, return the kth permutation sequence.
📄️ 0061-rotate-list
The rotate list is the problem to rotate the list to the right by k places.
📄️ 0062. Unique Paths
This is a solution to the Unique Paths problem on LeetCode.
📄️ 0063-Unique Paths II
There is a robot initially located at the top-left corner. The robot tries to move to the bottom-right corner. Return the number of possible unique paths that the robot can take to reach the bottom-right corner.
📄️ 0064-Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path.
📄️ 0065-Valid Number
Given a string s, return whether s is a valid number.
📄️ 0066-PlusOne
Problem Description
📄️ 0067-AddBinary
Problem Description
📄️ 0068-TextJustification
Solution to Leetcode 68 Text Justification
📄️ 0069-SqrtX
Problem Description
📄️ 0070-ClimbingStairs
Problem Description
📄️ 0071 - Simplify Path
This is a solution to the Simplify Path problem on LeetCode.
📄️ 0072-Edit-Distance
Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2.
📄️ 0073-SetMatrixZeros
Problem Description
📄️ 0074-search2Dmatrix
Problem
📄️ 0075 - Sort Colors
This is a solution to the Two Sum problem on LeetCode.
📄️ 0076-Minimum Window Substring
Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".
📄️ 0077-Combinations
Given two integers n and k, return all possible combinations of k numbers chosen from the range [1, n].
📄️ 0078 - Subsets
This is a solution to the Subsets problem on LeetCode.
📄️ 0079-Word Search
Given an m x n grid of characters board and a string word, return true if word exists in the grid.
📄️ 0080-Remove Duplicates from Sorted Array II
Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice.
📄️ 0081-Search in Rotated Sorted Array II
Given the array nums after the rotation and an integer target, return true if target is in nums, or false if it is not in nums.
📄️ 0082-RemoveDuplicatesFromSortedListII
Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the linked list sorted as well.
📄️ 0083 Remove Duplicates from Sorted List
This is a solution to the Remove Duplicates from Sorted List problem on LeetCode.
📄️ 0084-Largest Rectangle In Histogram
Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.
📄️ 085-Maximal Rectangle
This gives the solution for maximal Rectangle problem of leetcode
📄️ 0086-Partition List
partition it such that all nodes less than x come before nodes greater than or equal to x.
📄️ 0087-Scramble String
We can scramble a string s to get a string t using the following algorithm
📄️ 0088-MergeSortedArray
Problem Description
📄️ 0089-GrayCode
Problem Description
📄️ 0090-Subsets-II
Problem Description
📄️ 0091 - Decode Ways
This is a solution to the Decode Ways on LeetCode.
📄️ 0092 - Reverse Linked List II
This is a solution to the Reverse Linked List II problem on LeetCode.
📄️ 0093-Restore-IP-Addresses
Problem Description
📄️ 0094-Binary Tree Inorder Traversal
Problem
📄️ 0095-Unique-BST-II
Problem Description
📄️ 0096- Unique Binary Search Tree
Problem
📄️ Interleaving Strings
Problem Description
📄️ 0098 Validate Binary Search Tree
This is a solution to the Validate Binary Search Tree problem on LeetCode.
📄️ 0099 Recover Binary Search Tree
This is a solution to the Recover Binary Search Tree problem on LeetCode.