CS Fundamentals
Computer science fundamentals covering algorithms and data structures.
Notes / Collection
Computer science fundamentals covering algorithms and data structures.
4 ordinary notes and 3 index notes in this branch.
Entrance
The readable index note for this branch stays at its flat canonical URL.
Computer science fundamentals covering algorithms and data structures.
Modules
Nested module entrances under this branch.
Notes
Ordinary notes link to their unchanged flat note URLs.
定理:gcd(a,b) = gcd(b,a mod b) 证明:a可以表示成a = kb + r,则r = a mod b 假设d是a,b的一个公约数,则有 d a, d b,而r = a - kb,因此d r 因此d是(b,a mod b)的公约数 假设d 是(b,a mod b)的公约数,则 d b , d r ,但是a = kb +r 因此d也是(a,b)的公约数 因此(a,b)和(b,a mod b)的公约数是一样的,其最大公约数也必然相等,得证
数组是一种将相同类型的数据元素存储在连续内存空间中的基础数据结构。
树(Tree) 是 n(n>=0) 个结点的有限集。n=0 时称为空树。 在任意一颗非空树中: 1. 有且仅有一个特定的称为根(Root)的结点。 2. 当n>1时,其余节点可分为m(m>0)个互不相交的有限集T1,T2,…,Tm,其中每个集合本身又是一棵树,并且称为根的子树。
核心概念 循环链表是链表的一种变体。它的核心特点是:链表中最后一个节点的 next 指针不再指向 NULL,而是指向链表的头节点(Head),从而形成一个闭环。
Browse