Sudoku Solver LeetCode Solution
Write a program to solve a Sudoku puzzle by filling the empty cells.
Sudoku Solver LeetCode Solution Read More »
Write a program to solve a Sudoku puzzle by filling the empty cells.
Sudoku Solver LeetCode Solution Read More »
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.
Largest Rectangle in Histogram LeetCode Solution Read More »
Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
Search Insert Position LeetCode Solution Read More »
Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.
Permutations LeetCode Solution Read More »
Given a string containing just the characters ‘(‘ and ‘)’, return the length of the longest valid (well-formed) parentheses substring.
Longest Valid Parentheses LeetCode Solution Read More »
Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list’s nodes.
Swap Nodes in Pairs LeetCode Solution Read More »
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. You may return the combinations in any order.
Combination Sum LeetCode Solution Read More »
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.
Combination Sum II LeetCode Solution Read More »
Given an unsorted integer array nums, return the smallest missing positive integer.
First Missing Positive LeetCode Solution Read More »
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.
Trapping Rain Water LeetCode Solution Read More »
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.
Multiply Strings LeetCode Solution Read More »
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for ‘?’ and ‘*’ where: ‘?’ Matches any single character.’*’ Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string.
Wildcard Matching LeetCode Solution Read More »
You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums[0]. Each element nums[i] represents the maximum length of a forward jump from index i. In other words, if you are at nums[i], you can jump to any nums[i + j] where: 0 <= j <= nums[i] and i + j < n. Return the minimum number of jumps to reach nums[n - 1].
Jump Game II LeetCode Solution Read More »
Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.
Permutations II LeetCode Solution Read More »
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
Rotate Image LeetCode Solution Read More »