2016年10月5日

[LeetCode] 179. Largest Number

摘要: 题目: 利用sort函数,自己写一个比较函数compare,比较两个数字连接起来哪个大进行排序。 阅读全文

posted @ 2016-10-05 13:26 医生工程师 阅读(125) 评论(0) 推荐(0) 编辑

2016年9月25日

【LeetCode】172. Factorial Trailing Zeroes 解题小结

摘要: 题目: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 这题主要是计算n!中有多少个5存在,有5 阅读全文

posted @ 2016-09-25 22:58 医生工程师 阅读(151) 评论(0) 推荐(0) 编辑

2016年9月19日

[LeetCode]383. Ransom Note 解题小结

摘要: 题目: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the 阅读全文

posted @ 2016-09-19 05:12 医生工程师 阅读(198) 评论(0) 推荐(0) 编辑

2016年9月12日

【LeetCode】28. Implement strStr() 解题小结

摘要: 题目: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 简单题。 阅读全文

posted @ 2016-09-12 23:34 医生工程师 阅读(162) 评论(0) 推荐(0) 编辑

【LeetCode】344. Reverse String

摘要: 题目: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 应该说还是比较简单的。 阅读全文

posted @ 2016-09-12 23:08 医生工程师 阅读(141) 评论(0) 推荐(0) 编辑

【LeetCode】345. Reverse Vowels of a String 解题小结

摘要: 题目: Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Give 阅读全文

posted @ 2016-09-12 23:02 医生工程师 阅读(107) 评论(0) 推荐(0) 编辑

2016年9月11日

【LeetCode】168. Excel Sheet Column Title 解题小结

摘要: 题目: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example 简单题 阅读全文

posted @ 2016-09-11 11:49 医生工程师 阅读(145) 评论(0) 推荐(0) 编辑

【LeetCode】67. Add Binary 解题小结

摘要: 题目: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 阅读全文

posted @ 2016-09-11 11:20 医生工程师 阅读(213) 评论(0) 推荐(0) 编辑

【LeetCode】204. Count Primes 解题小结

摘要: 题目: Description: Count the number of prime numbers less than a non-negative number, n. 这个题目有提示,计算素数的方法应该不用多说。 阅读全文

posted @ 2016-09-11 10:00 医生工程师 阅读(103) 评论(0) 推荐(0) 编辑

【LeetCode】223. Rectangle Area 解题小结

摘要: 题目: Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner 阅读全文

posted @ 2016-09-11 09:18 医生工程师 阅读(162) 评论(0) 推荐(0) 编辑

导航