![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lintcode
忆几度长安
樱木花道最棒了。
刚来不久,记录自己学习过的知识,希望能多和大家共同进步。
展开
-
LintCode 9. Fizz Buzz
LintCode 9. Fizz BuzzDescriptionExampleChallengeSubmission1. if语句(最简单,但是多个if)2. 不用if,找规律(符合挑战要求)DescriptionGiven number n. Print number from 1 to n. But:when number is divided by 3, print fizz....原创 2019-05-19 05:31:18 · 166 阅读 · 0 评论 -
LintCode 11. Search Range in Binary Search Tree
LintCode 11. Search Range in Binary Search TreeDescriptionExampleChallengeSubmission1. 递归方法(中序遍历)2. 非递归方法(中序遍历)DescriptionGiven a binary search tree and a range [k1, k2], return node values within ...原创 2019-05-19 16:41:50 · 314 阅读 · 1 评论 -
LintCode 12. Min Stack
LintCode 12. Min StackDescriptionExampleChallengSubmission1. 主栈与最小栈一一对应2. 最小栈比较DescriptionImplement a stack with following functions:push(val)push val into the stackpop() pop the top element an...原创 2019-05-19 19:53:17 · 165 阅读 · 0 评论 -
LintCode 13. Implement strStr()
LintCode 12. Implement strStrDescriptionExampleChallengeSubmisson1. 穷举法(for循环)2. 穷举法(while,计数器)3. KMP算法(待补充)DescriptionFor a given source string and a target string, you should output the first ind...原创 2019-05-22 02:41:09 · 173 阅读 · 0 评论 -
LintCode 14. First Position of Target
LintCode 14. First Position of TargetDescriptionExampleChallengSubmission1. 二分法DescriptionFor a given sorted array (ascending order) and a target number, find the first index of this number in O(l...原创 2019-05-22 03:10:56 · 172 阅读 · 0 评论 -
LintCode 8. Roatate String
LintCode 8. Roatate StringDescriptionExampleChallengeSubmission1. 使用substr函数2. 两两交换的方式2.1 穷举法2.2 改进的穷举法DescriptionGiven a string(Given in the way of char array) and an offset, rotate the string by ...原创 2019-05-17 03:34:58 · 273 阅读 · 0 评论