摘要: LeetCode Notes_#35 Search Insert PositionLeetCode Contents题目思路和解答思路解答高票答案要注意的点 题目Given a sorted array and a target value, return the index if the target is found. If not, return the index where it w... 阅读全文
posted @ 2018-10-23 20:24 Howfar's 阅读(139) 评论(0) 推荐(0)
摘要: LeetCode Notes_#28 Implement strStr()LeetCode Contents题目思路及解答思路解答需要注意的点 题目Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.E... 阅读全文
posted @ 2018-10-23 15:37 Howfar's 阅读(133) 评论(0) 推荐(0)
摘要: LeetCode Notes_#27 Remove ElementContents题目思路和解答思路解答 题目Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for anot... 阅读全文
posted @ 2018-10-23 12:01 Howfar's 阅读(103) 评论(0) 推荐(0)
摘要: LeetCode Notes_#26 Remove Duplicates from Sorted ArrayLeetCode Contents题目思路及解答思路解答要注意的几点 题目Given a sorted array nums, remove the duplicates in-place such that each element appear only once and retur... 阅读全文
posted @ 2018-10-23 11:08 Howfar's 阅读(151) 评论(0) 推荐(0)
摘要: LeetCode Notes_#21 Merge Two Sorted Lists(剑指Offer#25)LeetCode剑指offer Contents 题目思路和解答思路python解答Java解答 题目 Merge two sorted linked lists and return it a 阅读全文
posted @ 2018-10-22 21:24 Howfar's 阅读(146) 评论(0) 推荐(0)
摘要: LeetCode Notes_#20 Valid ParenthesesLeetCodeContents题目思路和解答思路解答 题目Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input strin... 阅读全文
posted @ 2018-10-22 20:07 Howfar's 阅读(123) 评论(0) 推荐(0)
摘要: LeetCode Notes_#14 Longest Common PrefixLeetCodeContentsProblemSolution思路解答高票答案Java ProblemWrite a function to find the longest common prefix string amongst an array of strings.If there is no common... 阅读全文
posted @ 2018-10-19 11:54 Howfar's 阅读(197) 评论(0) 推荐(0)
摘要: 牛客21天刷题_day#3牛客 Contents 1.好多鱼题目思路和解答2.表达式求值题目解答 1.好多鱼 题目 牛牛有一个鱼缸。鱼缸里面已经有n条鱼,每条鱼的大小为fishSize[i] (1 ≤ i ≤ n,均为正整数),牛牛现在想把新捕捉的鱼放入鱼缸。鱼缸内存在着大鱼吃小鱼的定律。经过观察, 阅读全文
posted @ 2018-10-18 19:51 Howfar's 阅读(215) 评论(0) 推荐(0)
摘要: 牛客21天刷题_day#2牛客 Contents 1.禁忌雷炎题目思路和解答注意range的语法关于python的标准输入输出2.小易喜欢的单词题目思路和解答Python跳出两层循环 1.禁忌雷炎 题目 圆的半径平方为S,求坐标系里在这个圆周上面的整数坐标点有几个 输入 25 3 输出 12 0 思 阅读全文
posted @ 2018-10-17 19:14 Howfar's 阅读(223) 评论(0) 推荐(0)
摘要: 牛客21天刷题_day#1牛客Contents1.对称的二叉树(剑指 Offer #28)思路分析对称二叉树的判断条件递归函数解答1:递归(Java)解答1:递归(Python)解答2:非递归(Java)2.下厨房 1.对称的二叉树(剑指 Offer #28)请实现一个函数,用来判断一颗二叉树是不是对称的。注意,如果一个二叉树同此二叉树的镜像是同样的,定义其为对称的。 思路分析 对称二叉树... 阅读全文
posted @ 2018-10-17 10:31 Howfar's 阅读(233) 评论(0) 推荐(0)