leetcode
文章平均质量分 50
SherryWong1220
会用C++、Java、Python写Hello world!!!
展开
-
Leetcode之路 338. Counting Bits
1、题目描述 Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array. Example: For nu原创 2016-08-05 16:46:16 · 255 阅读 · 0 评论 -
Leetcode之路 292. Nim Game
1、题目描述 You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone wil原创 2016-08-05 16:58:42 · 276 阅读 · 0 评论 -
Leetcode之路 371. Sum of Two Integers
1、题目描述 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a = 1 and b = 2, return 3. Tags: Bit_Manipulation2、Java代码实现public c原创 2016-08-05 17:33:43 · 254 阅读 · 0 评论 -
Leetcode之路 258. Add Digits
1、题目描述 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 is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only原创 2016-08-05 21:27:16 · 281 阅读 · 0 评论 -
Leetcode之路 344. Reverse String
1、题目描述 Write a function that takes a string as input and returns the string reversed. Example: Given s = “hello”, return “olleh”. 2、C++实现class Solution {public: string reverseString(str原创 2016-08-03 21:16:24 · 253 阅读 · 0 评论