上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight 阅读全文
posted @ 2020-07-06 16:57 whatyouthink 阅读(73) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2020-07-06 15:10 whatyouthink 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa 阅读全文
posted @ 2020-07-06 14:57 whatyouthink 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2020-07-06 12:37 whatyouthink 阅读(98) 评论(0) 推荐(0) 编辑
摘要: On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y 阅读全文
posted @ 2020-07-06 12:32 whatyouthink 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. 给n个不同的数,求0-n这n+1个数里缺了哪个 利用异或运算的性 阅读全文
posted @ 2020-07-06 12:06 whatyouthink 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. pascal 三角形 a[i][j] = a[i - 1][j - 1] + a[i - 1][j] class Soluti 阅读全文
posted @ 2020-07-06 10:54 whatyouthink 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your t 阅读全文
posted @ 2020-07-03 20:53 whatyouthink 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Given an array A of integers, return true if and only if we can partition the array into three non-empty parts with equal sums. Formally, we can parti 阅读全文
posted @ 2020-07-03 20:40 whatyouthink 阅读(75) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2020-07-03 20:26 whatyouthink 阅读(119) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页