![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
MC17
这个作者很懒,什么都没留下…
展开
-
leetcode 233 - Number of Digit One
转载出处 http://www.cnblogs.com/grandyang/p/4629032.html这篇博客主要是提醒自己下次要弄明白这道题,现在还是不大懂Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal转载 2016-11-28 21:21:02 · 272 阅读 · 0 评论 -
java中抽象类与接口
今天第一次知道java中的抽象类可以没有抽象方法,而且可以抽象类中的静态非抽象方法可以通过抽象类名.静态方法名来调用。第一次知道Java SE 8中interface可以包含default方法,并引入了Lambda表达式。具体介绍可以参考关于Lambda表达式: http://www.infoq.com/cn/articles/Java-se-8-lambda关于interfac原创 2016-05-20 10:11:14 · 162 阅读 · 0 评论 -
leetcode 29 - Divide Two Integers
leetcode题目汇集 - Divide Two Integersleetcode 29 - Divide Two Integers题目要求Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.思原创 2016-11-27 11:49:04 · 183 阅读 · 0 评论 -
leetcode 69 - Sqrt(x)
leetcode题目汇集 — Sqrt(x)leetcode 69 - Sqrt(x)题目要求:Implement int sqrt(int x).Compute and return the square root of x.注意:程序中需要进行乘法计算,为避免数值逸出,中间数值应设置为long解法1:从1开始遍历,直到root的平方大于原创 2016-11-27 12:27:45 · 382 阅读 · 0 评论 -
leetcode 423 - Reconstruct Original Digits from English
leetcode题目汇集 - Reconstruct Original Digits from English423. Reconstruct Original Digits from English题目要求:Given a non-empty string containing an out-of-order English representation of digits原创 2016-11-27 21:19:36 · 358 阅读 · 0 评论 -
leetcode - Ugly Number、Ugly Number II 、Super Ugly Number
leetcode题目汇集 — Ugly Number系列首先看一下这几道题目要求Ugly NumberWrite a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2,原创 2016-11-28 10:13:12 · 191 阅读 · 0 评论 -
leetcode 319 - Bulb Switcher
leetcode题目汇集 — Bulb Switcherleetcode 319 - Bulb Switcher题目要求:There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third ro原创 2016-11-28 10:56:35 · 202 阅读 · 0 评论 -
leetcode - Roman to Integer 与 Integer to Roman
leetcode题目汇集 — Roman与Integer之间的互换参考网址https://zh.wikipedia.org/wiki/%E7%BD%97%E9%A9%AC%E6%95%B0%E5%AD%97Roman To Integer搬运维基百科对罗马数字性质的介绍:右加左减:在较大的罗马数字的右边记上较小的罗马数字,表示大数字加小数字。在较大的罗马数字的左边原创 2016-11-28 14:32:47 · 399 阅读 · 0 评论