LeetCode 做题记录

LeetCode 真好玩,我永远喜欢 LeetCode。
Github 链接: FrozenYogurtPuff/Leetcode

Continue reading

Harvard CS50 Week 7 SQL 学习笔记(更新中…)

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

第 7 周讲了 SQL 与表格和 CSV 之间处理,Python 的 lambda 函数,一些 SQL 的关键字与简单概念、内连接、警惕注入攻击等。

大部分内容引用自 CS50 课程官方的笔记

Continue reading

Harvard CS50 Week 6 Python 学习笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

第 6 周讲了 Python,把此前的诸多 C 程序转化为了 Python 实现,在此过程中介绍了 Python 的语法、特性及语言风格。最后见缝插针讲了很简短的正则的内容。我想在这里讲 Python,大概是稍后讲网页编程的时候,需要用到 Python 的 Flask 的缘故。

大部分内容引用自 CS50 课程官方的笔记

Continue reading

Harvard CS50 Week 5 Data Structures 学习笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

第 5 周的数据结构有些无聊了,先是讲了使用 realloc() 进行数组的扩展,然后引入了链表和二叉搜索树;然后是链表法的哈希表实现(然而哈希函数竟然是首字母索引)和前缀树。最后用几句话带过了栈、队列和词典。争取尽快看完,然后学习一下 CS61A 的 SICP 和 CS61B。

大部分内容引用自 CS50 课程官方的笔记

Continue reading

Harvard CS50 Week 4 Memory 学习笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

第 4 周揭开了 CS50 库中字符串的本质是字符数组,传参时则是字符指针的秘密。介绍了十六进制、指针、字符串、Valgrind 检测内存泄漏、函数传值与传指针的区别,以及文件读写的内容。大部分内容引用自 CS50 课程官方的笔记

Continue reading

Harvard CS50 Week 3 Algorithms 学习笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

虽然已经有一段时间了,但那天父亲突然走进房间,问我知不知道 Harvard 的 CS50,让我一头雾水。原来是电视上在放一套反思美国高校教育体系的纪录片,似乎是把 CS50 的创意性吹得天花乱坠。看来应该找时间看一看原片,到底是怎样的情况呢。

第 3 周介绍了算法,三种符号表示都提到了。从搜索:线性搜索和二分搜索开始。然后中途简单地说明了 C 的结构体。主要讲了排序方法:冒泡排序(包括改良 flag 版)、选择排序、通过递归思想引入了归并排序。大部分内容引用自 CS50 课程官方的笔记

Continue reading

DataCamp Python 数据科学中的数据类型 学习笔记

Data Types for Data Science in Python 是 DataCamp 中 Python Programmer Career Track 的第二门课程。

本节课可以学习到:

  • 基础数据类型的运用,包括列表、字典、元组等
  • 对于 collections 模块中进阶数据类型的使用
  • 通过 datetime 及第三方的 pytz 与 pendulum 等库处理日期、时间与时区转换
Continue reading

DataCamp Python 数据科学引论 学习笔记

Introduction to Data Science in Python 是 DataCamp 中 Python Programmer Career Track 的第一门课程。

本节课可以学习到:

  • 学写 Python 代码
  • 从表格中加载数据
  • 可视化数据
Continue reading

Harvard CS50 Week 2 Arrays 学习笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

上节课的时候,有一道信用卡验证的题目,看上去不用数组来解答是很困难的事情。我把这个问题分享给其他人并简单介绍了这门课,他们对这样的 C 语言作为计算机入门,并通过包装遮蔽一切指针和地址的教学做法感到困惑:Python 不是更能解决这样的问题吗?但在我看来,本周课中所涉及的内存与数组的同构性,恰恰揭示了 C 与硬件结构之间的强关联,这是使用 Python 或其他更加抽象的程序设计语言进行计算机科学入门所难以比拟的。

第 2 周的一个亮点在于通过内存与 C 语言数组的同构性掌握二者。也讲了字符串及字符串的操作,有很清楚易懂的编译环节(预处理-编译-汇编-链接)讲解,UNIX 式的启动参数思想和一些琐碎的自家小工具介绍。大部分内容引用自 CS50 课程官方的笔记

Continue reading

Harvard CS50 Week 1 C 学习笔记

CS50 (Computer Science 50) is an on-campus and online introductory course on computer science taught at Harvard University and, as of 2015, Yale University as well. In 2016, CS50 became available to high school students as an AP course. The course material is available online for free on EdX with a range of certificates available for a fee. The on-campus version is Harvard’s largest class with 800 students, 102 staff and up to 2,200 participants in their regular hackathons.

CS50, Wikipedia

* 此课程笔记根据 Harvard CS50 Spring 2020 完成。

第 1 周通过横向对比的教学方法实现了从 Scratch 代码到 C 代码的迁移。除了 C 的基本语法,也初步介绍了 clang 编译器及 make 命令行工具的使用方法。大部分内容引用自 CS50 课程官方的笔记

感到有点意思的地方,一个是从 Super Mario 的问号箱联系到 Console Game 的实现(虽然被轻描淡写转化为了某种字符打印问题);还有浮点精度以及溢出问题中提到的 Boeing 787 Integer OverflowY2K Problem 都很有意思。

值得一提的是,CS50 课程组使用自行编写的 <cs50.h> 库提供了字符串类型的实现以及 Python-like 的标准输入替代函数,隐去了指针的存在,实现了 知识屏蔽。这对于初学者来说有着很大的价值。

Continue reading

© 2020 雾琉璃

Theme by Anders NorénUp ↑