上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页
摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function sho 阅读全文
posted @ 2017-03-23 21:40 Tsunami_lj 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤ ai < 231. Find the maximum result of ai XOR aj, where 0 ≤ i, j < n. Could you do t 阅读全文
posted @ 2017-03-23 21:04 Tsunami_lj 阅读(135) 评论(0) 推荐(0) 编辑
摘要: A character in UTF8 can be from 1 to 4 bytes long, subjected to the following rules: This is how the UTF-8 encoding would work: Given an array of inte 阅读全文
posted @ 2017-03-23 12:08 Tsunami_lj 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Remember the story of Little Match Girl? By now, you know exactly what matchsticks the little match girl has, please find out a way you can make one s 阅读全文
posted @ 2017-03-21 22:19 Tsunami_lj 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: 阅读全文
posted @ 2017-03-21 13:25 Tsunami_lj 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space. 本题 阅读全文
posted @ 2017-03-20 12:09 Tsunami_lj 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th 阅读全文
posted @ 2017-03-19 16:37 Tsunami_lj 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The 阅读全文
posted @ 2017-03-18 16:37 Tsunami_lj 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-03-17 22:10 Tsunami_lj 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k num 阅读全文
posted @ 2017-03-17 20:55 Tsunami_lj 阅读(126) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页