Giter Site home page Giter Site logo

comparison-of-sorting-algorithms's Introduction

comparison-of-sorting-algorithms

数据结构课程小设计

内部排序算法比较

【问题描述】

在教科书中,各种内部排序算法的时间复杂度分析结果只给出了算法执行时间的阶,或大概执行时间。 试通过随机数据比较各种算法的关键字比较次数和关键字移动次数,以取得直观感受。

【任务要求】

(1)对以下8种常用的内部排序算法进行比较:冒泡排序、直接插入排序、 简单选择排序、希尔排序、堆排序、归并排序、快速排序、基数排序。

(2)待排序表的表长不小于10000;其中的数据要用伪随机数程序产生;至少要用5组不同的输入数据作比较; 比较的指标为:关键字的比较次数和移动次数(关键字交换计为3次移动),以及排序算法运行时间。

(3)最后要对结果作出简单分析,包括对各组数据得出结果波动大小的解释。

【测试数据】

由随机数产生

image

直接运行main.py或者在dist运行main.exe

comparison-of-sorting-algorithms's People

Contributors

csl30003 avatar

Stargazers

csl30003 ahri avatar  avatar  avatar  avatar WANGWEI avatar  avatar

Watchers

 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.