Give your career the gift of Coursera Plus with $160 off, billed annually. Save today.

Peking University

算法基础

Jiaying Liu 刘家瑛, Ph.D.
郭 炜

Instructors: Jiaying Liu 刘家瑛, Ph.D.

26,225 already enrolled

Included with Coursera Plus

Gain insight into a topic and learn the fundamentals.
4.8

(321 reviews)

38 hours to complete
3 weeks at 12 hours a week
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
4.8

(321 reviews)

38 hours to complete
3 weeks at 12 hours a week
Flexible schedule
Learn at your own pace

Details to know

Shareable certificate

Add to your LinkedIn profile

Taught in Chinese (Simplified)

See how employees at top companies are mastering in-demand skills

Placeholder

Build your subject-matter expertise

This course is part of the 程序设计与算法 Specialization
When you enroll in this course, you'll also be enrolled in this Specialization.
  • Learn new concepts from industry experts
  • Gain a foundational understanding of a subject or tool
  • Develop job-relevant skills with hands-on projects
  • Earn a shareable career certificate
Placeholder
Placeholder

Earn a career certificate

Add this credential to your LinkedIn profile, resume, or CV

Share it on social media and in your performance review

Placeholder

There are 11 modules in this course

好的算法是程序设计的灵魂!拥有了骄人战绩的你,在熟练掌握程序设计语言的同时,只有掌握了算法这个利器之后,才能在驾驭程序开发项目中出其不意、鬼斧神工!欢迎加入《算法基础》课程,为你的程序插上飞翔的翅膀!PS:我们这门课程一直处在不断地建设与优化当中,吸取了很多以往课程的经典视频,所以如果你看到视频中出现了不同课程的名字,也不要惊讶哦,因为你正在集百家所长:)

What's included

2 videos2 readings

在日常生活中我们经常遇到这样的情景:数字密码最后一位忘记了,就从0~9逐个尝试;去提货点取快递,快递员检查完所有包裹才找到属于你的;警察列举出所有的嫌疑人才有可能发现真凶…以上在进行归纳推理时,逐个考察了某类事情的所有可能情况,并逐一进行检验,这种方法叫做枚举。枚举比较直观,易于理解,本模块将介绍枚举算法的基本数学模型和常用策略,从而解决通过公式推导、规则演绎的方法不能解决的问题。PS:我们这门课程一直处在不断地建设与优化当中,吸取了很多以往课程的经典视频,所以如果你看到视频中出现了不同课程的名字,也不要惊讶哦,因为你正在集百家所长:)

What's included

3 videos1 reading1 programming assignment

递归调用是设计和描述算法的一种有力工具,尤其是在解决复杂问题时经常采用。它的基本思想是要解决某一问题A,可以先解决一个形式相同,但规模小一点的问题B。问题B如果解决了,那么问题A也就迎刃而解。有些问题使用传统的迭代算法是很难求解甚至无解的,而使用递归却可以很容易地解决。本模块将通过具体的例题介绍如何构造递归函数,如何设置递归终止的条件以及分析递归算法的复杂度。

What's included

4 videos1 reading1 programming assignment

通过上一模块的学习,你已经了解如何通过递归的办法解决问题,但是单纯的递归往往会导致子问题被重复计算,因此在解决某些问题的时候,效率会很低。而将一个问题分解为子问题递归求解,并且将中间结果保存以避免重复计算的方法就叫做“动态规划”。本模块将初步介绍对于特定的问题如何寻找子问题、定义问题的状态以及状态转移方程。

What's included

3 videos1 reading1 programming assignment

如何进行动态规划,没有一定之规,需要具体问题具体分析。本模块首先由典型的“最长上升子序列”引入,进一步展示几个较难的动规例题,深入探讨动态规划算法中状态的设计以及状态转移关系的构建。

What's included

4 videos1 reading1 programming assignment

想象我们在一座迷宫里,如何才能找到出口呢?最直观的方法是从入口开始沿着一条路一直走到底,如果遇到分叉路口就选择其中一条道路走下去,如果遇到死胡同就退回到上一个分叉路口,选择另一条道路走下去,如果遇到出口就成功走出迷宫了。这种尽量往深处走的做法即是深度优先搜索(深搜)。深搜算法编程简单,简洁易懂,空间需求也比较低,但是这种方法的时间复杂度往往是指数级的,如果不加以优化,时间效率无法忍受。本模块将通过实例继续讨论深度优先搜索算法中优化程序的基本方法“剪枝”,即在设计剪枝判断方法的基础上,避免一些不必要的遍历过程,从而提高算法效率。

What's included

3 videos1 reading1 programming assignment

本模块继续通过两道例题,强调了两种最通用的剪枝方法:可行性剪枝和最优性剪枝的应用。可行性剪枝即在寻找解的过程中,预判出从当前状态出发不可能找到解,从而不再从当前状态继续;最优性剪枝就是记录到目前为止找到的最优解,当发现正在探索的解其代价已经不小于最优解,或预测出其最终代价必将不小于最优解,则停止当前解的探索。

What's included

2 videos1 reading1 programming assignment

与深度优先搜索算法类似,广度优先搜索(广搜)也是常用的搜索图的算法。它的思想是从一个顶点开始,辐射状地优先遍历其周围较广的区域。一般可以用它做什么呢?一个最直观经典的例子就是走迷宫,从起点开始,找出到终点的最短路程,很多最短路径算法都是基于广搜的思想。广索的基本方法是使用队列存放已经扩展过的节点。本模块先以简单例题引入广搜的基本实现方法,然后再通过经典的"八数码"问题,进一步介绍状态表示、判重的节省时间和空间的技巧。

What's included

4 videos1 reading1 programming assignment

二分法是在有序或单调的区间中快速寻找答案的有效方法,当数据量很大适宜采用该方法。所谓贪心算法,即总是作出在当前看来最好的选择。也就是说贪心算法并不从整体最优考虑,它所作出的选择只是在某种意义上的局部最优选择。但是,贪心算法对很多问题都能得到整体最优解。在一些情况下,即使贪心算法不能得到整体最优解,其最终结果却是最优解的很好近似。贪心算法没有固定的算法框架,算法设计的关键是贪心策略的选择。本模块将介绍二分与贪心这两个对很多问题都非常有效的算法策略。

What's included

4 videos1 reading1 programming assignment

3个小时11道题目,这就是每年我们程序设计实习课程在校内的收官之作,让无数北大学生魂牵梦绕又各种怨念纠结的期末盛宴。你是不是准备好了呢?快来测测吧!也别忘了,搞定了基本算法并不代表着你作为程序员所向披靡啦,毕竟好的 程序=数据结构+算法。快去参加张铭老师的《数据结构基础》吧,你值得拥有!

What's included

1 programming assignment

真的要把课程的接力棒传给张老师了,颇有些不舍!很高兴通过MOOC专项课程的方式结识不一样的你。希望我们的课程能带给你收获与思考,加油,你会是一位出色的程序员!

What's included

1 video

Instructors

Jiaying Liu 刘家瑛, Ph.D.
Peking University
3 Courses56,677 learners
郭 炜
Peking University
3 Courses56,677 learners

Offered by

Recommended if you're interested in Algorithms

Why people choose Coursera for their career

Felipe M.
Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

Learner reviews

Showing 3 of 321

4.8

321 reviews

  • 5 stars

    84.73%

  • 4 stars

    11.21%

  • 3 stars

    2.18%

  • 2 stars

    0.62%

  • 1 star

    1.24%

PS
4

Reviewed on Aug 17, 2016

New to Algorithms? Start here.

Placeholder

Open new doors with Coursera Plus

Unlimited access to 7,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription

Advance your career with an online degree

Earn a degree from world-class universities - 100% online

Join over 3,400 global companies that choose Coursera for Business

Upskill your employees to excel in the digital economy

Frequently asked questions