Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into sets of k consecutive numbersReturn Tru ...
分类:
其他好文 时间:
2020-01-18 10:37:01
阅读次数:
92
eclipse在dao层写的模糊查询sql:String sql = "select count(*) from product where pname like '%?%'"; 这样写会导致以下错误 Wrong number of parameters: expected 0, was given ...
分类:
其他好文 时间:
2020-01-18 00:43:09
阅读次数:
108
public int[] sumZero(int n) { int [] Array= new int[n]; int sum=0; //前n-1个数之和 for(int i=0;i<Array.length-1;i++) { Array[i] = i; sum+=i; } Array[Array. ...
分类:
其他好文 时间:
2020-01-17 23:15:57
阅读次数:
80
题目: Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Input: [1,3,5,4,7] Output: 2 Explanation: The t ...
分类:
编程语言 时间:
2020-01-17 19:04:48
阅读次数:
77
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer ...
分类:
其他好文 时间:
2020-01-17 15:08:09
阅读次数:
93
Given an array of non-negative integers arr, you are initially positioned at start index of the array. When you are at index i, you can jump to i + ar ...
分类:
其他好文 时间:
2020-01-17 13:27:34
阅读次数:
62
原题链接在这里:https://leetcode.com/problems/asteroid-collision/ 题目: We are given an array asteroids of integers representing asteroids in a row. For each as ...
分类:
其他好文 时间:
2020-01-17 13:13:01
阅读次数:
61
题目 Given a sequence of K integers {$N_{1},N_{2},...N_{k}$}. A continuous subsequence is defined to be {$N_{i},N_{i+1},...N_{j}$} where $1≤i≤j≤K$. The ...
分类:
其他好文 时间:
2020-01-16 17:22:49
阅读次数:
63
Given an integer n, return any array containing n unique integers such that they add up to 0. Example 1: Input: n = 5 Output: [-7,-1,1,3,4] Explanatio ...
分类:
其他好文 时间:
2020-01-16 14:19:16
阅读次数:
90
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro ...
分类:
其他好文 时间:
2020-01-16 13:02:01
阅读次数:
85