Skip to content

leonw1112/SortAlgorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Algorithms in C++

This repository contains C++ code that implements several sorting algorithms. You can use these algorithms to sort an array of integers in ascending order. The available sorting algorithms are:

  • Bubble Sort
  • Quick Sort
  • Merge Sort
  • Insertion Sort
  • Heap Sort

Getting Started

Prerequisites

To compile and run the code, you need:

  • A C++ compiler (e.g., g++)
  • A text file named list.txt containing a list of integers to be sorted (one integer per line)

Compilation

Open a terminal or command prompt and navigate to the directory where the code is located. Use the following command to compile the code:

main:

g++ -o main main.cpp

listgen:

g++ -o listgen listgen.cpp

Usage

Open a terminal or command prompt and navigate to the directory where the code is located. Use the following command to use the code:

main.cpp:

./main

listgen.cpp:

./listgen

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages