摘要: Description: Given an array of n integers where n 1, nums, return an array output such that output[i] is equal to the product of all the elements of ... 阅读全文
posted @ 2015-08-28 02:15 影湛 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Description: Given n non negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that... 阅读全文
posted @ 2015-08-27 05:39 影湛 阅读(89) 评论(0) 推荐(0) 编辑
摘要: ### Description:> Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find... 阅读全文
posted @ 2015-08-26 04:05 影湛 阅读(75) 评论(0) 推荐(0) 编辑
摘要: Description: 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 ... 阅读全文
posted @ 2015-08-26 03:31 影湛 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Description: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given th... 阅读全文
posted @ 2015-08-25 21:12 影湛 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Description: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1] , find a peak element and ... 阅读全文
posted @ 2015-08-20 02:54 影湛 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Description: Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the la... 阅读全文
posted @ 2015-08-18 00:10 影湛 阅读(135) 评论(0) 推荐(0) 编辑
摘要: ### Description:> Reverse bits of a given 32 bits unsigned integer.> For example, given input 43261596 (represented in binary as **0000001010010100000... 阅读全文
posted @ 2015-08-16 14:41 影湛 阅读(154) 评论(0) 推荐(0) 编辑
摘要: ### Description:> Implement the following operations of a stack using queues.> > - push(x) -- Push element x onto stack.> - pop() -- Removes the eleme... 阅读全文
posted @ 2015-08-13 00:00 影湛 阅读(95) 评论(0) 推荐(0) 编辑
摘要: ### Description:> Given a singly linked list, determine if it is a palindrome.>> ###### Follow up:> Could you do it in O(n) time and O(1) space?### So... 阅读全文
posted @ 2015-08-12 21:14 影湛 阅读(108) 评论(0) 推荐(0) 编辑