跳到主要内容
学院
初级 代码街区

算法与数据结构

大 O 表示法、搜索、排序,以及背后的数据结构。

Algorithms are the recipes behind every fast app, and data structures are the containers those recipes work on. This track teaches the ideas every developer is expected to know: counting steps with Big O, searching with linear and binary search, and choosing between lists, hash maps, sets, stacks and queues. Then you will write recursion with memoization, see how merge sort reaches n log n, and walk a friends network with breadth-first search. The last module goes further with search trees, heaps, dynamic programming and Dijkstra's shortest paths.

Every example is short, runnable Python that works on everyday app data: scores, usernames, leaderboards and friends. Basic Python (variables, loops, functions, lists and dicts) is all you need to start.

课时
14
时长
2 小时
级别
初级

本课程的内容目前为英文。

  • 铜牌 可挑战
  • 银牌 可挑战
  • 金牌 未解锁

准备好证明自己了吗?

三场考试正等着你:铜牌、银牌和金牌。

前往考试

学完后你将能够

  • Count an algorithm's steps and describe its growth with Big O
  • Search with linear and binary search, without off-by-one bugs
  • Pick the right structure: list, dict, set, stack or queue
  • Write recursive functions and speed them up with memoization and dynamic programming
  • Explain why merge sort is O(n log n), and sort real data with sorted()
  • Walk a network with breadth-first search and find the cheapest route with Dijkstra's algorithm

学习旅程

  1. 1
    第 1 单元

    Thinking in steps

    What an algorithm is, what Big O says, and searching a list one item at a time or by halves.

    0 / 4
  2. 2
    第 2 单元

    Structures that make code fast

    Hash maps and sets, stacks and queues, recursion, sorting and graphs.

    0 / 6
  3. 3
    第 3 单元

    Going further

    Search trees, heaps, dynamic programming and shortest paths.

    0 / 4

快速导航