摘要:
import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Given a set of candidate numbers (C) (without duplicates) and a target number (T), * find all unique combinations ... 阅读全文
摘要:
直接上代码 阅读全文
摘要:
直接上代码 阅读全文
摘要:
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space. 用的 阅读全文
摘要:
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
摘要:
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example,Given nums = [0, 1, 阅读全文
摘要:
n,m是需要判断的元素的横纵坐标,rl,cl是数组的横纵长度 阅读全文
摘要:
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = 阅读全文