algorithm008-class02's People
Forkers
melody-li ly21st jnnan scallion91 dyy8023xy bdl-1989 kyoku-seii sayahuang whatakitty xiaosaturn rosencrystal iamcharieli2016 lkhavetwocat huxuzhe huanglk8888 cqjwl yuqiu-pp abnerwang wenshengr smallqqq zjy-viva-la-vida mountainhill yueguang27 zgingko zhaochenkai20000726 chenchuxin wyc192273 malimalihoong lbc989 zy967 qunqiang volsier carlory wxdland mengbaodexiaocao family-01 mrlanka sutfuturecoder wangshunru zhj806504628 meiyoumen zhouyixxx airfly2020 nacl96 orzerorz ljyscjhbb sandyzidane nogroceries jingjingpiggy alic-yuan daisy-zly chenzhongtan lilyluoauto best-boy yun-01 persist-gy vergito618 ken8271 hellobea guoziliangshr koftcl ciimoo zxh7 revene hui0x5b huanzhenzhang0923 smallljl wangbaobiao zhangqinghe congshuli yffffff brolly0204 jukylin cakiecakiepython ohheysherry66 cowboy-hk baiyinnamula yajunjiao dylenwu fuwuchen hcl-smile rogerluozj muzili902 ethanzhao92 baduserpass niuniu-doc jiawei-zhang95 zenwinter amotan reyke emmalyy lwx124 jetfeng xiongxy dokcer-oo veming pimg-wu thewayonly 834352982 tan899208algorithm008-class02's Issues
#学号: G20200343050214
#学号: G20200343050214
#姓名: 包丁立
#班级: 2班
#小组: 刷题狂魔组
#语言: c#
#作业&总结链接: https://github.com/Bdl-1989/algorithm008-class02/tree/master/Week_02
居然还看到了c#的,好厉害,值得学习,借鉴
add
#学号:G20200343050228
#姓名:杨伟雄
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/yffffff/algorithm008-class02/tree/master/Week_01
算法训练营(第8期)第二周作业
要求
- 每周从覃超老师布置的题目中,至少完成并提交两道算法题
- 围绕每周重点学习的算法知识点,撰写一篇有观点和思考的技术文章或总结,切忌流水账。
- 每周需要 review 并点评至少 5 位同学的代码作业或学习总结
作业提交 Deadline
2020年4月26日 23:59 (以当地时间为准)
未按时提交作业,会在个人作业总分中 -2 分
本周作业概述
本周需要完成学习的视频内容:
- 第 5 课 | 哈希表、映射、集合
- 第 6 课 | 树、二叉树、二叉搜索树
- 第 6 课 | 堆和二叉堆、图
其中,第 5 课的课后作业(第2节视频后)还包括:
- 写一个关于HashMap的小总结
说明:对于不熟悉Java语言的同学,此项作业可选做。
请大家将此部分作业,放在本周学习总结中一并提交
本周算法习题库:
简单
写一个关于 HashMap 的小总结。
说明:对于不熟悉 Java 语言的同学,此项作业可选做。
https://leetcode-cn.com/problems/valid-anagram/description/
https://leetcode-cn.com/problems/two-sum/description/
https://leetcode-cn.com/problems/n-ary-tree-preorder-traversal/description/
HeapSort :自学 https://www.geeksforgeeks.org/heap-sort/
中等
https://leetcode-cn.com/problems/group-anagrams/
https://leetcode-cn.com/problems/binary-tree-inorder-traversal/
https://leetcode-cn.com/problems/binary-tree-preorder-traversal/
https://leetcode-cn.com/problems/n-ary-tree-level-order-traversal/
https://leetcode-cn.com/problems/chou-shu-lcof/
https://leetcode-cn.com/problems/top-k-frequent-elements/
#学号:G20200343050206
#学号:G20200343050206
#姓名:郑灿平
#班级:2班
#小组:996组 & python
#作业&总结链接:https://github.com/ZGingko/algorithm008-class02/tree/master/Week_02
这总结,很给力,很给力,的学些学习
youjielian
#学号: G20200343050234
#姓名: youjielian
#班级: 8期2班
#小组:肌李呱啦
#语言:java
#作业&总结链接: https://github.com/yjlCreate/algorithm008-class02/tree/master/Week_02
Week02作业链接集合 👈 作业交这里
#学号:
#姓名:
#班级:
#小组:
#语言:
#作业&总结链接:
请准确无误地复制上述格式,我们的作业通过工具抓取,格式不对无法被统计到。
查看学号请登录官网:https://u.geekbang.org/schedule 左侧头像下面就是你的学号
airfly第一周作业
#学号:G20200343050040
#姓名:airfly
#班级:2班
#小组:无
#作业&总结链接:https://github.com/airfly2020/algorithm008-class02/tree/master/Week_01
review
#学号: G20200343050376
#姓名: ericzhang
#班级: 2班
#小组: java
#作业&总结链接: https://github.com/ZenWinter/algorithm008-class02/tree/master/Week_01
Originally posted by @ZenWinter in #1 (comment)
代码很干净
第三周作业提交
#学号:G20200343050068
#姓名:easy
#班级:2班
#小组:刷题狂魔组
#语言:cpp go
#作业&总结链接:https://github.com/yajunjiao/algorithm008-class02/tree/master/Week_03
高杨
MenglingWang_One_Week_HW
#学号:G20200343050222
#姓名:MenglingWang
#班级:2班
#小组:刷题狂魔组 & Go
#作业&总结链接:https://github.com/MenglingWang/algorithm008-class02/tree/master/Week_01
review
#学号: G20200343050382
#姓名: Dine_Kobe
#班级: 2班
#小组: 刷题狂魔组
#作业&总结链接: https://github.com/tan899208/algorithm008-class02/tree/master/Week_01
没有学习总结哦。。。
Originally posted by @ZGingko in #1 (comment)
代码很简洁,厉害来
> #学号:G20200343050344
#学号:G20200343050344
#姓名:陈楚新
#班级:2班
#小组:刷题狂魔组
#语言:java & python
#作业&总结链接:https://github.com/chenchuxin/algorithm008-class02/tree/master/Week_02
用md的方式来整理算法,值得学习。
【问题Q&A】收集
Q: 这里的时间复杂度是 n 还是 n^2
func moveZeroes(nums []int) {
j:=0
for i:=0; i<len(nums); i++{
if nums[j] == 0 {
// nums = append(nums[:j], append(nums[j+1:], nums[j])...)
nums = append(nums[:j], nums[j+1:]...)
nums = append(nums, 0)
j--
}
j++
}
}
A: 这里值得注意的是 nums = append(nums[:j], nums[j+1:]...)
这条语句, 它的作用不是 添加而是删除 下标为 j 的元素,在数组中,插入和删除元素的时间复杂度是 O(n), 由于外层 for 循环 的关系,这里的整体时间复杂度是 O(n^2)
Q: 检测环的时候使用快慢指针,走2步和走多步哪个效率高,怎么证明?
https://code-examples.net/zh-CN/q/4e4806
Q: 网上说链表和数组的插入性能都是o(n) ,这块是什么情况?
A: 数组的插入 O(n) 的复杂度毫无疑问,但是链表的插入为 O(n) 是有问题的,在这里,链表在某个点插入新的结点的时间复杂度是 O(1), 但是在找到这个位置的过程时间复杂度是 O(n), 注意把握概念。
work
#学号:G20200447010728
#姓名:吴伟东
#班级:3班
#小组:2组
#作业&总结链接:https://www.jianshu.com/p/537af994ea24
luoyongli
#学号: G20200343050360
#姓名: 罗永丽
#班级: 算法8期-02班
#小组:
#语言: python
#作业&总结链接: https://github.com/lilyluoauto/algorithm008-class02/tree/master/Week_03
#学号:G20200388010210
#学号:G20200388010210
#姓名:伊文龙
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/yiwenlong/algorithm008-class02/tree/master/Week_02
题很多,值得借鉴,抽空把go的题量刷上去
javaYJL
#学号:G20200343050234
#姓名:游接练
#班级:2班
#小组:叽哩呱啦
#作业&总结链接:https://github.com/yjlCreate/algorithm008-class02/tree/master/Week_01
review
#学号: G20200343050123
#姓名:洪超灵
#班级:1班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/hcl-smile/algorithm008-class02/tree/master/Week_01/
这位同学代码写的很详细,把各种写法都写下来,并且记录下来了。想象我的代码,只记录了最后的一种解法,值得学习,借鉴
#学号:G20200343050116
#学号:G20200343050116
#姓名:张景铭
#班级:算法8期2班
#小组:996组
#作业&总结链接:https://github.com/orzerorz/algorithm008-class02/tree/master/Week_01
这位同学采用了脑图的方式,别具一格,值得学习和借鉴。
review
#学号:G20200343050344
#姓名:陈楚新
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/chenchuxin/algorithm008-class02/tree/master/Week_01
采用了2中语言,java和python,总结写的也很好,值得学习
杨振江第一周作业
#学号:G20200343050174
#姓名:杨振江
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/red010y/algorithm008-class02/tree/master/Week_01
> #学号:G20200343050112
#学号:G20200343050112
#姓名:吴雨宸
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/wyc192273/algorithm008-class02/tree/master/Week_02
刷了很多题,努力程度值得借鉴
Week03 作业链接集合 👈 作业交这里
#学号:
#姓名:
#班级:
#小组:
#语言:
#作业&总结链接:
请准确无误地复制上述格式,我们的作业通过工具抓取,格式不对无法被统计到。
查看学号请登录官网:https://u.geekbang.org/schedule 左侧头像下面就是你的学号
week02--学号:G20200343050128
#学号:G20200343050128
#姓名:王保彪
#班级:算法8期2班
#小组:刷题狂魔组,勤学好问组
#作业&总结链接:https://github.com/wangbaobiao/algorithm008-class02/tree/master/Week_02
#学号: G20200343050356
#学号: G20200343050356
#姓名: 张远
#班级: 2班
#小组: 刷题狂魔组 & python组
#语言: python
#作业&总结链接: https://github.com/Alic-yuan/algorithm008-class02/tree/master/Week_02
厉害,python 一直没怎么刷过,向您学习
第一周作业-daisy
#学号:G20200343050094
#姓名:Magic_Daisy
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/Daisy-ZLY/algorithm008-class02/tree/master/Week_01
算法训练营(第8期)第四周作业
要求
- 每周从覃超老师布置的题目中,至少完成并提交两道算法题
- 围绕每周重点学习的算法知识点,撰写一篇有观点和思考的技术文章或总结,切忌流水账。
作业提交 Deadline
2020年5月17日 23:59 (以当地时间为准)
未按时提交作业,会在个人作业总分中 -2 分
本周作业概述
本周需要完成学习的视频内容:
- 第 9 课 | 深度优先搜索和广度优先搜索
- 第10课 | 贪心算法
- 第11课 | 二分查找
以上三课视频后,覃超老师都给出了大家可以练手的算法题。
本周算法习题库:
简单:
https://leetcode-cn.com/problems/lemonade-change/description/
https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-ii/description/
https://leetcode-cn.com/problems/assign-cookies/description/
https://leetcode-cn.com/problems/walking-robot-simulation/description/
使用二分查找,寻找一个半有序数组 [4, 5, 6, 7, 0, 1, 2] 中间无序的地方
说明:同学们可以将自己的思路、代码写在第 4 周的学习总结中
中等:
https://leetcode-cn.com/problems/word-ladder/description/
https://leetcode-cn.com/problems/number-of-islands/
https://leetcode-cn.com/problems/minesweeper/description/
https://leetcode-cn.com/problems/jump-game/
https://leetcode-cn.com/problems/search-in-rotated-sorted-array/
https://leetcode-cn.com/problems/search-a-2d-matrix/
https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array/
困难
https://leetcode-cn.com/problems/word-ladder-ii/description/
https://leetcode-cn.com/problems/jump-game-ii/
作业
#学号:G20190379010006
#姓名:羽球
#班级:2班
#小组:勤学好问组
#作业&总结链接:https://github.com/yuqiu-pp/algorithm008-class02/tree/master/Week_01
week02--G20200343050360
#学号: G20200343050360
#姓名: 罗永丽
#班级: 8期2班
#小组:
#语言: python
#作业&总结链接: https://github.com/lilyluoauto/algorithm008-class02/tree/master/Week_02
review
#学号:G20200343060060
#姓名:张一兵
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/yibing-dev/algorithm008-class02/blob/master/Week_01
Originally posted by @yibing-dev in #1 (comment)
总结写得很好,👍
来晚了
#学号:G20200343050232
#姓名:鬼画符
#班级:2
#小组:勤学好问
#作业&总结链接:https://github.com/batiao/algorithm008-class02/tree/master/Week_01
week1
#学号:G20200343050123
#姓名:洪超灵(微信昵称:Michael)
#班级:1班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/hcl-smile/algorithm008-class02
youjielian
#学号:G20200343050234
#姓名:游接练
#班级:02
#小组:叽哩呱啦
#语言:java
#作业&总结链接:https://github.com/yjlCreate/algorithm008-class02/tree/master/Week_03
G20200343050208-第二周作业
#学号:G20200343050208
#姓名:颜文娴
#班级:算法8期2班
#小组:Java组
#作业&总结链接:yanwenxian@28cc637
算法训练营(第8期)第一周作业
要求
- 每周从覃超老师布置的题目中,至少完成并提交两道算法题
- 围绕每周重点学习的算法知识点,撰写一篇有观点和思考的技术文章或总结,切忌流水账。
- 每周需要 review 并点评至少 5 位同学的代码作业或学习总结
作业提交 Deadline
2020年4月19日 23:59 (以当地时间为准)
未按时提交作业,会在个人作业总分 -2 分
本周作业概述
本周需要完成学习的视频内容:
- 第 3 课 | 数组、链表、跳表
- 第 4 课 | 栈、队列、优先队列、双端队列
以上两课视频后,覃超老师都给出了大家可以练手的算法题。
其中,第 4 课的课后作业(第2节视频后)还包括:
- 用add first或add last这套新的API改写Deque的代码
- 分析Queue和Priority Queue的源码
请大家将此部分作业,放在本周学习总结中一并提交
本周算法习题库:
第三课课后习题:
https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/
https://leetcode-cn.com/problems/rotate-array/
https://leetcode-cn.com/problems/merge-two-sorted-lists/
https://leetcode-cn.com/problems/merge-sorted-array/
https://leetcode-cn.com/problems/two-sum/
https://leetcode-cn.com/problems/move-zeroes/
https://leetcode-cn.com/problems/plus-one/
第四课课后习题:
https://leetcode.com/problems/design-circular-deque
https://leetcode.com/problems/trapping-rain-water/
用add first或add last这套新的API改写Deque的代码
分析Queue和Priority Queue的源码
改写代码和分析源码这两项作业,需要在你的本周学习总结中一并提交。
week2_G20200343050136
#学号:G20200343050136
#姓名:刘季祥
#班级:2班
#小组:996组
#作业&总结链接:https://github.com/ljx1991/algorithm008-class02/tree/master/Week_02
day01
#学号:G20200343050218
#姓名:邬湘东
#班级:2班
#小组:勤学好问组
#作业&总结链接:https://github.com/wxdland/algorithm008-class02/tree/master/Week_01
学号:G20200343040108
#学号:G20200343040108
#姓名:wenshengrui
#班级:2班
#小组:勤学好问组, PHP组
#作业&总结链接:https://github.com/wenshengr/algorithm008-class02/blob/master/Week_02
Week1作业
#学号:G20200343050036
#姓名:赵方明
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/peterzfm/algorithm008-class02/tree/master/Week_01
review
#学号: G20200343050360
#姓名: 罗永丽
#班级: 算法8期-2班
#小组:
#作业&总结链接: https://github.com/lilyluoauto/algorithm008-class02/tree/master/Week_01
这位同学写的很不错,总结写的也很好,还是用python写的,值得学习借鉴
【G20200343040108-Week 01】 - 总结及作业
#学号:G20200343040108
#姓名:wenshengrui
#班级:2班
#小组:勤学好问组, PHP组
#作业&总结链接:https://github.com/wenshengr/algorithm008-class02/tree/master/Week_01
算法训练营(第8期)第三周作业
要求
- 每周从覃超老师布置的题目中,至少完成并提交两道算法题
- 围绕每周重点学习的算法知识点,撰写一篇有观点和思考的技术文章或总结,切忌流水账。
作业提交 Deadline
2020年5月10日 23:59 (以当地时间为准)
未按时提交作业,会在个人作业总分中 -2 分
本周作业概述
本周需要完成学习的视频内容:
- 第 7 课 | 泛型递归、树的递归
- 第 8 课 | 分治、回溯
以上两课视频后,覃超老师都给出了大家可以练手的算法题。
本周算法习题库:
第七课课后习题:
https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/
https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
https://leetcode-cn.com/problems/combinations/
https://leetcode-cn.com/problems/permutations/
https://leetcode-cn.com/problems/permutations-ii/
第八课课后习题:
https://leetcode-cn.com/problems/majority-element/description/
https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/
https://leetcode-cn.com/problems/n-queens/
week2 作业
#学号:G20200343050202
#姓名:张森
#班级:2班
#小组:996组 & java
#作业&总结链接:https://github.com/best-boy/algorithm008-class02/tree/master/Week_02
Week 01 作业链接合集
#学号:
#姓名:
#班级:
#小组:
#作业&总结链接:
请准确无误地复制上述格式,我们的作业通过工具抓取,格式不对无法被统计到。
查看学号请登录官网:https://u.geekbang.org/schedule 左侧头像下面就是你的学号
week01
#学号:G20200343050302
#姓名:王顺如
#班级:算法8期2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/wangshunru/algorithm008-class02/tree/master/Week_01
review
#学号:G20200343050218
#姓名:邬湘东
#班级:2班
#小组:勤学好问组
#作业&总结链接:https://github.com/wxdland/algorithm008-class02/tree/master/Week_01
这个哥们做的题不少,总结写的也别有一格,值得学习
#学号:G20200343050184
#学号:G20200343050184
#姓名:白音那木拉
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/baiyinnamula/algorithm008-class02/tree/master/Week_02
整理的很详细,值得学习,借鉴
review
#学号:G20200343050244
#姓名:梁琨
#班级:2班
#小组:刷题狂魔组
#作业&总结链接:https://github.com/lkhavetwocat/algorithm008-class02/tree/master/Week_01
Originally posted by @lkhavetwocat in #1 (comment)
每题都带有思路,良心
【问题Q&A】Week 02
时间复杂度分析
上述的时间复杂度是 O(n^2)
如何进行时间复杂度分析?
- 只关注循环执行次数最多的一段代码
- 加法法则:总复杂度等于量级最大的那段代码的复杂度(总的时间复杂度就等于量级最大的那段代码的时间复杂度)
- 乘法法则:嵌套代码的复杂度等于嵌套内外代码复杂度的乘积
常见的时间复杂度
1. O(1)
O(1) 只是常量级时间复杂度的一种表示方法,并不是指只执行了一行代码
只要代码的执行时间不随 n 的增大而增长,这样代码的时间复杂度我们都记作 O(1)
只要算法中不存在循环语句、递归语句,即使有成千上万行的代码,其时间复杂度也是Ο(1)只要算法中不存在循环语句、递归语句,即使有成千上万行的代码,其时间复杂度也是Ο(1)
2. O(logn)、O(nlogn)
在采用大 O 标记复杂度的时候,可以忽略系数,即 O(Cf(n)) = O(f(n)), O(log2n)、O(log3n)统一表示为 O(logn)
3. O(m+n)、O(m*n)
代码的复杂度由两个数据 m 和 n 的规模来决定
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.