上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

2019年4月5日

摘要: For a non-negative integer X, the array-form of X is an array of its digits in left to right order. For example, if X = 1231, then the array form is [ 阅读全文
posted @ 2019-04-05 08:21 一直走在路上 阅读(131) 评论(0) 推荐(0)
摘要: The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding one 阅读全文
posted @ 2019-04-05 07:34 一直走在路上 阅读(161) 评论(0) 推荐(0)
摘要: Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. 阅读全文
posted @ 2019-04-05 06:55 一直走在路上 阅读(136) 评论(0) 推荐(0)

2019年4月4日

摘要: Given an array A of positive integers, A[i] represents the value of the i-th sightseeing spot, and two sightseeing spots i and j have distance j - i b 阅读全文
posted @ 2019-04-04 08:01 一直走在路上 阅读(121) 评论(0) 推荐(0)
摘要: Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a binary number (from most-significant-bit to least-si 阅读全文
posted @ 2019-04-04 06:11 一直走在路上 阅读(109) 评论(0) 推荐(0)

2019年4月3日

摘要: Given an array A, partition it into two (contiguous) subarrays left and right so that: Every element in left is less than or equal to every element in 阅读全文
posted @ 2019-04-03 19:36 一直走在路上 阅读(96) 评论(0) 推荐(0)

2019年4月2日

摘要: Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2019-04-02 08:51 一直走在路上 阅读(110) 评论(0) 推荐(0)

2019年4月1日

摘要: 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 @ 2019-04-01 05:34 一直走在路上 阅读(265) 评论(0) 推荐(0)
摘要: Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. E 阅读全文
posted @ 2019-04-01 03:47 一直走在路上 阅读(186) 评论(0) 推荐(0)

2019年3月30日

摘要: Design and implement a TwoSum class. It should support the following operations:add and find. add - Add the number to an internal data structure.find 阅读全文
posted @ 2019-03-30 07:48 一直走在路上 阅读(111) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

导航