You have k lists of sorted integers in ascending order. Find the smallest range tha…
分类:LeetCode题目解答
LeetCode 091 Decode Ways
题目描述 A message containing letters from A-Z is being encoded to numbers using the following mapping: ‘A’ -> …
318. Maximum Product of Word Lengths
Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do…
109. Convert Sorted List to Binary Search Tree
欢迎fork and star:Nowcoder-Repository-github 109. Convert Sorted List to Binary Search Tree 题目 Given a singly li…
313. Super Ugly Number
Write a program to find the nth super ugly number.Super ugly numbers are positive numbers whose all prime fact…
[LeetCode] Unique Binary Search Trees II 独一无二的二叉搜索树之二
Given n, generate all structurally unique BST’s (binary search trees) that store v…
[LeetCode] Reverse Linked List 倒置链表,Reverse Linked List II
Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3-…
[LeetCode] Group Shifted Strings 群组偏移字符串
Given a string, we can “shift” each of its letter to its successive letter, for example:&nb…
[LeetCode] Find the Duplicate Number 寻找重复数
Given an array nums containing n + 1 integers where each integer is between 1 and&n…
LeetCode | Gray Code
题目: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-n…
LeetCode 190 Reverse Bits
题目描述 Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binar…
[Leetcode] Walls and Gates 墙与门
Walls and Gates You are given a m x n 2D grid initialized with these three possible values. -1 – A wall …