Loading

上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: Given a set of distinct positive integers nums, return the largest subset answer such that every pair (answer[i], answer[j]) of elements in this subse 阅读全文
posted @ 2021-11-20 14:04 aalanwyr 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers where nums[i] is in the range [1, n], return an array of all the integers in the range [1, n] that do not appear in  阅读全文
posted @ 2021-11-20 13:57 aalanwyr 阅读(27) 评论(0) 推荐(0) 编辑
摘要: Given an n x n matrix where each of the rows and columns is sorted in ascending order, return the kth smallest element in the matrix. Note that it is 阅读全文
posted @ 2021-11-19 21:51 aalanwyr 阅读(20) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array nums of length n where nums is a permutation of the numbers in the range [0, n - 1]. You should build a set s[k] = {num 阅读全文
posted @ 2021-11-19 21:49 aalanwyr 阅读(20) 评论(0) 推荐(0) 编辑
摘要: Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become: [ 阅读全文
posted @ 2021-11-19 21:44 aalanwyr 阅读(30) 评论(0) 推荐(0) 编辑
摘要: You are given an m x n matrix M initialized with all 0's and an array of operations ops, where ops[i] = [ai, bi] means M[x][y] should be incremented b 阅读全文
posted @ 2021-11-19 21:33 aalanwyr 阅读(33) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer c, decide whether there're two integers a and b such that a2 + b2 = c. 只要是two_sum 变形 都可以考虑用hash_set来做。 class Solution { p 阅读全文
posted @ 2021-11-19 21:30 aalanwyr 阅读(35) 评论(0) 推荐(0) 编辑
摘要: Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure. fin 阅读全文
posted @ 2021-11-19 21:27 aalanwyr 阅读(23) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each inp 阅读全文
posted @ 2021-11-19 21:26 aalanwyr 阅读(18) 评论(0) 推荐(0) 编辑
摘要: Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific targe 阅读全文
posted @ 2021-11-19 21:23 aalanwyr 阅读(24) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 下一页