
LeetCode
文章平均质量分 50
陈浅墨
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
338. Counting Bits
Problem description 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. Exam原创 2016-08-16 17:24:42 · 1143 阅读 · 0 评论 -
344. Reverse String
Problem description Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 题目描述: 编写一个函数,输入是一个字符串,输出是该字符串的逆序。 例子: 输入:“Hello”,返原创 2016-08-16 16:52:27 · 469 阅读 · 0 评论 -
371. Sum of Two Integers
Problem description 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. 题目描述 计算两个整数a与b的和,但是你不能使用+、-运算 例子原创 2016-08-17 16:07:22 · 870 阅读 · 1 评论 -
136. Single Number
Problem description Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you imple原创 2016-08-18 15:40:47 · 454 阅读 · 0 评论 -
292. Nim Game
Problem description 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 l原创 2016-08-18 11:21:21 · 551 阅读 · 0 评论 -
字典序全排列
字典序法的描述如下: 设P是1~n的一个全排列:p=p1p2……pn=p1p2……pj-1pjpj+1……pk-1pkpk+1……pn 从排列的右端开始,找出第一个比右边字符小的字符的序号j(j从左端开始计算),即 j=max{i|pi原创 2017-07-10 16:22:25 · 1559 阅读 · 0 评论