08 2018 档案

摘要:Given an integer n, return the number of trailing zeroes in n!. Example 1: Input: 3Output: 0Explanation: 3! = 6, no trailing zero. Example 2: Input: 5 阅读全文
posted @ 2018-08-21 20:16 cwpeng 阅读(186) 评论(0) 推荐(0) 编辑
摘要:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2018-08-21 16:36 cwpeng 阅读(218) 评论(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 @ 2018-08-20 14:52 cwpeng 阅读(204) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2018-08-19 13:15 cwpeng 阅读(128) 评论(0) 推荐(0) 编辑
摘要:Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 阅读全文
posted @ 2018-08-15 20:57 cwpeng 阅读(199) 评论(0) 推荐(0) 编辑
摘要:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2018-08-15 16:20 cwpeng 阅读(127) 评论(0) 推荐(0) 编辑
摘要:Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 来自 <https://leetcode.com/problems/linke 阅读全文
posted @ 2018-08-14 15:03 cwpeng 阅读(99) 评论(0) 推荐(0) 编辑