Giter Site home page Giter Site logo

janymuong / sorting_algorithms Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 234 KB

Implementation of sorting algorithms, asymptotic analysis, and BIG - O notation

License: GNU General Public License v3.0

C 100.00%
asymptotic-analysis sorting-algorithms c datastructures

sorting_algorithms's Introduction

C- Sorting algorithms & Big O

data structures, algorithms
covers: implementation of sorting algorithms, asymptotic analysis, and BIG - O notation

Sorting Algorithms

Sorting algorithms are a type of algorithm that takes an array of elements and sorts them based on some defined order e.g. ascending or descending, or some form of a lexicographical operation.

sample algorithms, for context:
bubble sort, selection sort, insertion sort, quick sort, merge sort, radix sort
focuses on the first 4

Asymptotic Analysis

Asymptotic analysis is a way of gauging the performance of algorithms as the size of the input increases and not paying attention to the machine specific implementation. Asymptotic analysis is used to compare the performance of different algorithms and to choose the best algorithm for a given problem.

The most common way to express the asymptotic running time of an algorithm is using Big-O notation. Big-O notation is a way of classifying the asymptotic running time of an algorithm based on its growth rate.

Examples of Big-O notations:

  • O(1): this means that the algorithm's running time is constant, regardless of the size of the input.
  • O(n): (time complexity of linear growth), and it increases with the size of the input.
  • O(n^2): this means that the algorithm's running time is quadratic, and it increases quadratically with the size of the input.
  • O(2^n): the time complexity of exponential growth, and it increases exponentially with the size of the input
  • O(n!): the time complexity of factorial growth
  • O(log(n)): is the time complexity of logarithmic growth
  • O(nlog(n)): the time complexity of nlog(n) growth, which is possible if we are using a balanced binary search tree and working with some array that is sorted.

meme :)

sorting_algorithms's People

Contributors

janymuong avatar

Watchers

 avatar  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.