自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (3)
  • 收藏
  • 关注

原创 LeetCode_13:Majority Element

1、总结divide and conquer是我的薄弱项,这样的题型我都不知道从何下手;2、题目Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that...

2019-09-30 18:26:07 76

原创 LeetCode_12:Two Sum II - Input array is sorted

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Ma...

2019-09-29 15:51:37 76

原创 LeetCode_11:Best Time to Buy and Sell Stock II

1、总结:1、看solution2(解法三)中对while的灵活使用,使得代码一气呵成。我虽然明白这道题用波峰波谷的想法去破题,但是实现的却很粗糙,有一种武功招式没有跟上内功心法的赶脚(中二????)2、切记:学习算法根本目的是为了解决实际问题,所以锻炼思维很重要,实现方式也很重要!3、当我看到solution2的时候,我还在感慨代码实现的干净;当我看到solution3的时候又真实感受到了思维...

2019-09-27 18:50:58 159 1

原创 LeetCode_10:Best Time to Buy and Sell Stock

1、总结:(1)这道题一看题目给我的感觉就很熟悉,很像之前做 第五题 Maximum Subarray 的时候,当时的算法其实还不是很明白,但是现在隐约有思路,自己写了一个demo input(1, 5, 2, 9, 0, 3, 4)发现问题果然没有那么单纯,最小值在最大值的右边这种情况应注意处理(2)在感觉熟悉之后,第一反应就是倒叙求解,试了一下可行;(3)今天通过不同的解法感受到算法的...

2019-09-25 23:01:17 69

原创 LeetCode_09:Pascal's Triangle II

1、总结下次还是先实现基础方法,再研究优化问题,这一道题由于我想总结出计算公式,卡了好久…我感觉还是可以推断出计算公式的,只是现在刷题为重,先过…2、题目Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal’s triangle.Note that the row index...

2019-09-24 22:08:52 101

原创 LeetCode_08:Pascal's Triangle

1、总结:2、题目:Given a non-negative integer numRows, generate the first numRows of Pascal’s triangle.In Pascal’s triangle, each number is the sum of the two numbers directly above it.Example: Input: ...

2019-09-23 19:10:12 94

原创 LeetCode_07:Merge Sorted Array

1、总结:如果正向思考遇到问题不妨反向尝试一下,思路也许会简洁很多。2、题目:Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:The number of elements initialized in nums1 and nums2 are ...

2019-09-18 19:53:54 80

原创 LeetCode_06:Plus One

1、总结1、还是要仔细审题,一开始想当然用了数组拼接为字符串再转为Int处理,后来发现Int长度根本不够,还是要一个一个循环遍历处理才行;偷懒不可取啊…2、可能不明显,但其实还是涉及到一些问题,比如数组的拷贝、数组的修改方法等等,需要了解…2、题目:Given a non-empty array of digits representing a non-negative integer...

2019-09-18 16:47:49 83

原创 LeetCode_05:Maximum Subarray

1、总结:我太难了,想想第二题的时候,再想想今天,告诉自己苟住…2、题目:Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example: Input: [-2,1,...

2019-09-17 11:54:46 65

原创 LeetCode_04:Search Insert Position

1、总结:感觉自己每次想出一种解法,就很难再有别的解决方案了,知识储备还是太少;对于时间复杂度和空间复杂度的计算还是不敏感,没有准确的概念。尤其是想要优化代码空间复杂度的时候,感觉无从下手,基本全靠学习他人的解决方法。2、题目:Given a sorted array and a target value, return the index if the target is found...

2019-09-11 17:49:43 76

原创 LeetCode_03:Remove Element

1、总结:上一题开心完今天就跪了,算法虽然也解决问题,但是不知道为什么空间复杂度居高。2、题目: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 another a...

2019-09-10 14:40:32 122

原创 LeetCode_02:Remove Duplicates from Sorted Array

今天,先允许我开心一下????????????,因为今天这道题首次提交成绩居然还不错!~有点开心有点满足,感受到知识学习的回报了,虽然才学习了两天,哈哈哈~1、总结:分享一篇今天看的微信公众号文章,讲《前端应该如何准备数据结构和算法》,感觉有收获:https://mp.weixin.qq.com/s/Y5X5CmyX4Xj_jslHi5Y22g2、题目:Given a sorted array nums...

2019-09-09 16:56:10 76

原创 LeetCode_01:Two Sum

今天开始刷LeetCode啦,少壮不努力老大徒伤悲~1、题目:Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solutio...

2019-09-02 17:06:36 73

jquery.validate.js

jQuery表单数据格式校验 插件的源码:jquery.validate.js

2017-08-24

中国国内省市区地址下拉控件

中国国内省市区地址下拉控件,三级联动,数据算比较全的

2017-08-24

分页的存储过程

数据库分页的存储过程,简单实用.@currentPage 和 @pageSize 同时不为空时则进行分页,否则是返回前N个记录

2015-06-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除