Giter Club home page Giter Club logo

toys's Introduction

算法与数据结构练习(Python3)

作者:Chai Fei
E-mail:cforth [at] cfxyz.com
主要是Python写的算法与数据结构练习代码,还有《计算的本质:深入剖析程序和计算机》这本书中的演示代码。书中是Ruby语言实现的,我改写成了Python语言实现。

combinations

数学中的组合、排列、枚举算法的演示代码。以及我设计的一种多进制数算术系统的实现。

  1. 集合中所有组合的生成算法
  2. 集合中所有排列的生成算法
  3. 集合中所有枚举的生成算法
  4. 多进制数算术系统的实现

sort

常用的排序算法的演示代码。

  1. 选择排序算法
  2. 插入排序算法
  3. 希尔排序算法
  4. 合并排序算法
  5. 堆排序算法
  6. 快速排序算法
  7. 计数排序算法
  8. 基数排序算法

graphs

图的数据结构与算法。

  1. 无向图的邻接列表表示
  2. 深度优先算法
  3. 深度优先路径查询

search

常用的搜索算法的演示代码。

  1. 二叉搜索树的实现
  2. 深度与广度优先遍历

search/print_tree

一个外国牛人写的小工具,打印出树结构图(C语言)。

Simple

《计算的本质:深入剖析程序和计算机》中第二章的Simple语言实现。

  1. 小步操作语义-表达式
  2. 小步操作语义-语句
  3. 大步操作语义
  4. 指称语义

Automaton

《计算的本质:深入剖析程序和计算机》中第三章以及第四章的自动机实现。

  1. 确定性有限自动机(Deterministic Finite Automaton,DFA)
  2. 非确定性有限自动机(Nondeterministic Finite Automata,NFA)
  3. 正则表达式的实现
  4. NFA与DFA的等价性
  5. 确定性下推自动机(Deterministic PushDown Automaton,DPDA)
  6. 非确定性下推自动机(Nondeterministic Pushdown Automaton,NPDA)
  7. 词法分析(Lexical Analyzer)
  8. 语法分析(Grammar Analyzer)

Turing

《计算的本质:深入剖析程序和计算机》中第五章的图灵机实现。

  1. 确定型图灵机(Deterministic Turing Machine,DTM)

LambdaCalculus

《计算的本质:深入剖析程序和计算机》中第六章、第七章的Lambda演算实现。

  1. 模拟lambda演算
  2. FizzBuzz游戏(0-50)
  3. lambda演算

toys's People

Contributors

cforth avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.