ποΈ 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.