随笔分类 -  leetcode刷题

lintcode2 尾部的零
摘要:这题就是在求阶乘后面的0,我第一次想的方法很简单,先乘出来然后在除10,肯定可以了。但是这个的时间复杂度超了 所以我们使用获取能被5整除的数字的方法来求值 其实是个数学问题,和你的编程能力没什么关系。。。 阅读全文

posted @ 2018-03-07 15:53 一个新人代码农民 阅读(126) 评论(0) 推荐(0)

617. Merge Two Binary Trees
摘要:Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文

posted @ 2018-02-25 21:48 一个新人代码农民 阅读(102) 评论(0) 推荐(0)

leetcode 657. Judge Route Circle
摘要:Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the or 阅读全文

posted @ 2018-02-25 21:04 一个新人代码农民 阅读(121) 评论(0) 推荐(0)

leetcaode Hamming Distance
摘要:The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文

posted @ 2018-02-25 15:44 一个新人代码农民 阅读(199) 评论(0) 推荐(0)

导航