上一页 1 2 3 4 5 6 7 8 9 ··· 37 下一页
摘要: Given the API rand7 which generates a uniform random integer in the range 1 to 7, write a function rand10 which generates a uniform random integer in 阅读全文
posted @ 2020-08-31 15:47 fatttcat 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. You may re 阅读全文
posted @ 2020-08-25 12:56 fatttcat 阅读(92) 评论(0) 推荐(0) 编辑
摘要: We distribute some number of candies, to a row of n = num_people people in the following way: We then give 1 candy to the first person, 2 candies to t 阅读全文
posted @ 2020-08-20 14:06 fatttcat 阅读(101) 评论(0) 推荐(0) 编辑
摘要: You have n candies, the ith candy is of type candies[i]. You want to distribute the candies equally between a sister and a brother so that each of the 阅读全文
posted @ 2020-08-20 13:45 fatttcat 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2020-08-17 10:31 fatttcat 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Example 1: 阅读全文
posted @ 2020-08-17 08:56 fatttcat 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
posted @ 2020-08-17 07:41 fatttcat 阅读(145) 评论(0) 推荐(0) 编辑
摘要: In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 representing a fresh orange; the value 2  阅读全文
posted @ 2020-08-11 06:25 fatttcat 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 阅读全文
posted @ 2020-08-11 06:03 fatttcat 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 阅读全文
posted @ 2020-08-11 05:09 fatttcat 阅读(190) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 37 下一页