Coder Social home page Coder Social logo

algorithm-php's Introduction

php实现常用算法

二分查找(binary_search.php

  • 递归方式
  • 非递归方式

冒泡排序(bubble_sort.php

  • 最坏时间复杂度 O(n^2)
  • 最好时间复杂度 O(n)
  • 空间复杂度 O(1)

插入排序(insert_sort.php

  • 最坏时间复杂度 O(n^2)
  • 最好时间复杂度 O(n)
  • 空间复杂度 O(1)

快速排序(quick_sort.php

  • 最坏时间复杂度 O(n^2)
  • 最好时间复杂度 O(nlog2n)
  • 空间复杂度 O(nlog2n)

选择排序(select_sort.php

  • 最坏时间复杂度 O(n^2)
  • 最好时间复杂度 O(n^2)
  • 空间复杂度 O(1)

归并排序(mergeSort.php

希尔排序(shell_sort.php

  • 时间复杂度:下界是O(nlog2n),与增量序列的选取有关
  • 空间复杂度 O(1)

堆排序(heap_sort.php

  • 最坏时间复杂度 O(nlog2n)
  • 最好时间复杂度 O(nlog2n)
  • 空间复杂度 O(1)

栈操作(stack.php

字符串匹配算法-sunday算法(sunday.php

二叉树(binary_tree.php

红黑树(red_black_tree.php

字典树(trie.php

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.