- 博客(9)
- 资源 (1)
- 收藏
- 关注
转载 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 279
原创 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 404
原创 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 209
原创 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 196
原创 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 372
原创 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 387
原创 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 190
原创 leetcode 258- Add Digits
leetcode题目汇集 — Add Digitsleetcode 258- Add Digits 题目要求 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process
2016-11-26 13:03:20 292
原创 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 166
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人