上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页

2018年10月29日

摘要: Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible stri 阅读全文
posted @ 2018-10-29 14:31 chiyeung 阅读(250) 评论(0) 推荐(0) 编辑

2018年10月28日

摘要: Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Alice has, and B[j] is the size of the j-th bar of ca 阅读全文
posted @ 2018-10-28 10:09 chiyeung 阅读(175) 评论(0) 推荐(0) 编辑

2018年10月27日

摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two di 阅读全文
posted @ 2018-10-27 09:44 chiyeung 阅读(118) 评论(0) 推荐(0) 编辑

2018年10月26日

摘要: An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i <= j, A[i] <= A[j]. A 阅读全文
posted @ 2018-10-26 13:55 chiyeung 阅读(176) 评论(0) 推荐(0) 编辑

2018年10月25日

摘要: On a N * N grid, we place some 1 * 1 * 1 cubes. Each value v = grid[i][j] represents a tower of v cubes placed on top of grid cell (i, j). Return the 阅读全文
posted @ 2018-10-25 10:12 chiyeung 阅读(185) 评论(0) 推荐(0) 编辑

2018年10月23日

摘要: Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example, given a 3-ary tree: 阅读全文
posted @ 2018-10-23 09:08 chiyeung 阅读(254) 评论(0) 推荐(0) 编辑

2018年10月22日

摘要: A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the 阅读全文
posted @ 2018-10-22 16:39 chiyeung 阅读(197) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2018-10-22 16:24 chiyeung 阅读(106) 评论(0) 推荐(0) 编辑

2018年10月21日

摘要: Invert a binary tree. Example: Input: 4 / \ 2 7 / \ / \ 1 3 6 9 Output: 4 / \ 7 2 / \ / \ 9 6 3 1 Trivia:This problem was inspired by this original tw 阅读全文
posted @ 2018-10-21 09:10 chiyeung 阅读(188) 评论(0) 推荐(0) 编辑

2018年10月20日

摘要: Given two integers L and R, find the count of numbers in the range [L, R](inclusive) having a prime number of set bits in their binary representation. 阅读全文
posted @ 2018-10-20 11:31 chiyeung 阅读(154) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页

导航