LeetCode
sucoder
这个作者很懒,什么都没留下…
展开
-
LeetCode---231. Power of Two
Given an integer, write a function to determine if it is a power of two. 大意为: 判断输入的数字是否是2次幂的数 解题思路: 入门级思考,不过第一个注释我看到是有这么一个简单的方法可以调用,还有这种操作 附上代码: // return n>0 && Integer.bitCount(n)原创 2017-07-31 11:22:09 · 186 阅读 · 0 评论 -
LeetCode---2.Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the sam原创 2017-07-27 09:16:08 · 165 阅读 · 0 评论 -
LeetCode---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 not. You need to merge them into a new binary tr原创 2017-07-27 09:29:30 · 172 阅读 · 0 评论 -
LeetCode---166. Fraction to Recurring Decimal
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the repeating part in parentheses.原创 2017-07-27 15:22:44 · 232 阅读 · 0 评论