上一页 1 ··· 8 9 10 11 12 13 下一页
摘要: 题目描述: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any 阅读全文
posted @ 2018-02-04 19:25 宵夜在哪 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the las 阅读全文
posted @ 2018-02-03 15:20 宵夜在哪 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4 阅读全文
posted @ 2018-02-03 14:46 宵夜在哪 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 题目描述: The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read off as 阅读全文
posted @ 2018-02-02 12:29 宵夜在哪 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted 阅读全文
posted @ 2018-02-02 10:58 宵夜在哪 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 比对字符串haystack和needl 阅读全文
posted @ 2018-02-01 14:04 宵夜在哪 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array 阅读全文
posted @ 2018-02-01 11:12 宵夜在哪 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra sp 阅读全文
posted @ 2018-01-31 16:49 宵夜在哪 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Write a function to find the longest common prefix string amongst an array of strings. 读入一个char**和字符串的数量strSize,返回所有字符串前面相同的字符(char*类型). 解题思路: 将 阅读全文
posted @ 2018-01-31 15:21 宵夜在哪 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 问题描述: 约瑟夫问题:有n只猴子,按顺时针方向围成一圈选大王(编号从1到n),从第1号开始报数,一直数到m,数到m的猴子退出圈外,剩下的猴子再接着从1开始报数。就这样,直到圈内只剩下一只猴子时,这个猴子就是猴王,编程求输入n,m后,输出最后猴王的编号。 输入: 每行是用空格分开的两个整数,第一个是 阅读全文
posted @ 2017-11-25 22:51 宵夜在哪 阅读(224) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 下一页