GeetCode Hub

Hard

Sudoku Solver

37. Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells. A&nbsp;sudoku solution must satisfy all of&nbsp;the following rules: Each of the digits&nbsp;1-9 must occur exactly&nbsp;once in each row. Each of the digits&nbsp;<c

read more...

Medium

Count and Say

38. Count and Say

The count-and-say sequence is a sequence of digit strings defined by the recursive formula: countAndSay(1) = &quot;1&quot; countAndSay(n) is the way you would &quot;say&quot; the digit string from countAndSay(n-1), w

read more...

Medium

Combination Sum

39. 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. You may retur

read more...

Medium

Combination Sum II

40. Combination Sum II

Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates&nbsp;where the candidate numbers sum to target. Each number in candidates&nbsp;may only be used <s

read more...

Hard

First Missing Positive

41. First Missing Positive

Given an unsorted integer array nums, find the smallest missing positive integer. You must implement&nbsp;an algorithm that runs in O(n) time and uses constant extra space. &nbsp; Example 1: Input: nums =

read more...

Hard

Trapping Rain Water

42. 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. &nbsp; Example 1: <img src="https://raw.githubusercontent.com/sumitc91/GeetCodeImage/master

read more...

Medium

Multiply Strings

43. Multiply Strings

Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Note:&nbsp;You must not use any built-in BigInteger library or convert the inputs t

read more...

Hard

Wildcard Matching

44. Wildcard Matching

Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for &#39;?&#39; and &#39;*&#39; where: &#39;?&#39; Matches any single character. &#39;*&#39; Matches

read more...

Medium

Jump Game II

45. Jump Game II

Given an array of non-negative integers nums, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your goal is to reach the last index in the minimum number of jumps. You

read more...

Medium

Permutations

46. Permutations

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. &nbsp; Example 1: Input: nums = [1,2,3] Output: [[1,2,3],[1,3,2

read more...

Medium

Permutations II

47. Permutations II

Given a collection of numbers, nums,&nbsp;that might contain duplicates, return all possible unique permutations in any order. &nbsp; Example 1: Input: nums = [1,1,2] Output: [[1,1,

read more...

Medium

Rotate Image

48. Rotate Image

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means

read more...