-
Given two integers n and k, return all possible combinations of k numbers out of 1 … n.
Example:
12345678910Input: n = 4, k =...
-
The set [1,2,3,...,n] contains a total of n! unique permutations.
By listing and labeling all of the permutations in order, w...
-
Given a collection of intervals, merge all overlapping intervals.
Example 1:
123Input: [[1,3],[2,6],[8,10],[15,18]]Output: [[...
-
Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
Example:
1234567Input...
-
Number of Islands
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An isl...
-
Rotate List
Given a linked list, rotate the list to the right by k places, where k is non-negative.
Example 1:
12345Input:...
-
jar包放置在hadoop平台出现 Caused by: java.util.zip.ZipException: error in opening zip fileat java.util.zip.ZipFile.open(Native Method...
-
Given an array of strings, group anagrams together.
For example, given: ["eat", "tea", "tan", &...
-
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what...
-
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2.
Note:
The length ...