![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
无Bug说
这个作者很懒,什么都没留下…
展开
-
LeetCode----day1
最近停下脚步,练习算法了,通过这2天的刷题,越发感觉基础知识的重要了我会不定期发一些leetcode上我做的题目今天把这两天学习到的写一下:很抱歉,我第一题就卡住了,最后无奈,看了答案,写了两种方法 两数之和 : easy // method1: 利用数组,蛮力搜索,时间复杂度 O(n^2) public static int[] twoSum(int[] nums, in...原创 2019-02-24 00:42:31 · 108 阅读 · 0 评论 -
LeetCode: day2
字符串,锯齿形转换思路:example :String : “0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15” row:4先把这一串字符串想象成一个 字符数组: char[] arr = {‘0’,‘1’,‘2’,‘3’,‘4’,‘5’,‘6’,‘7’,‘8’,…} 0 6 12 1 5 7 ...原创 2019-02-26 16:58:00 · 99 阅读 · 0 评论