An open API service indexing awesome lists of open source software.

https://github.com/filiprokita/sortingalgorithms

This is a program that demonstrates two sorting algorithms, Bubble Sort and Insertion Sort, by generating a random array of 10,000 integers and sorting it with both algorithms. The program then prints the sorted arrays.
https://github.com/filiprokita/sortingalgorithms

algorithms bubble bubble-srot insertion insertion-sort python sort sorting

Last synced: 3 months ago
JSON representation

This is a program that demonstrates two sorting algorithms, Bubble Sort and Insertion Sort, by generating a random array of 10,000 integers and sorting it with both algorithms. The program then prints the sorted arrays.

Awesome Lists containing this project

README

          

# sortingAlgorithms

sortingAlgorithms is a Python program that demonstrates two sorting algorithms: bubble sort and insertion sort.

## How it works

The program generates a list of 10,000 random integers between 0 and 9. It then applies bubble sort and insertion sort to the list and prints the sorted results.

### Bubble Sort

Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.

### Insertion Sort

Insertion sort is another simple sorting algorithm that builds the final sorted array one item at a time. It iterates through the input list, removes one item at a time, finds the location it belongs within the sorted list, and inserts it there. It repeats until no input elements remain.

## Installation

To run the program, simply download the code and run it using a Python interpreter. This program does not require any external libraries or dependencies.

## Usage

Once the program has been executed, the sorted results will be printed to the console.