LeetCode-Medium

A collection of 12 posts

record.image

Engineering

[LeetCode][Medium] 89. Gray Code

An n-bit gray code sequence is a sequence of 2n integers where

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 77. Combinations

Given two integers n and k, return all possible combinations of k numbers out of the range [1, n].

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 46. Permutations

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 63. Unique Paths II

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 62. Unique Paths

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 47. Permutations II

Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 17. Letter Combinations of a Phone Number

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 15. 3Sum

Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 16. 3Sum Cloest

Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution.

author.image
1 min
record.image

Engineering

[LeetCode][Medium] 19. 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.

author.image
1 min