Giter VIP home page Giter VIP logo

sorting_algorithms's Introduction

Sorting Algorithms in C++ ๐Ÿ“ˆ๐Ÿ”ข

This repository contains an implementation of several common sorting algorithms in C++. The purpose of this project is to provide a resource for anyone who wants to learn more about sorting algorithms and how they work.

Algorithms ๐Ÿงฎ

The following algorithms are currently implemented:

  • Bubble Sort ๐Ÿงผ
  • Insertion Sort ๐Ÿ“ฉ
  • Shell Sort ๐Ÿš
  • Selection Sort ๐Ÿ‘ˆ๐Ÿ‘‰
  • Heap Sort ๐Ÿ’พ
  • Merge Sort ๐Ÿค
  • Quick Sort โšก

Each algorithm is implemented in its own C++ source file, which can be compiled and run as a standalone program or imported into another C++ project.

Usage ๐Ÿ’ป

To compile and run any of the algorithms from the command line, simply navigate to the project directory and type:

g++ -std=c++11 <algorithm_name>.cpp -o <algorithm_name>
./<algorithm_name>

Replace <algorithm_name> with the name of the C++ source file you want to compile and run.

Alternatively, you can include any of the source files in your own C++ project and use them as a library. For example:

#include "bubble_sort.h"

int main() {
  int myArray[] = {4, 2, 7, 1, 3};
  int arraySize = sizeof(myArray) / sizeof(int);

  bubble_sort(myArray, arraySize);

  for (int i = 0; i < arraySize; ++i) {
    std::cout << myArray[i] << " ";
  }
  std::cout << std::endl;

  return 0;
}

Contributing ๐Ÿค๐Ÿผ

Contributions to this project are welcome! If you find a bug or want to add a new algorithm, please open an issue or submit a pull request.

Acknowledgements ๐Ÿ™

This project was inspired by the sorting algorithms section of the Algorithms and Data Structures course on YouTube, taught by Dr.Ahmed Hamdy.

Contact ๐Ÿ“ง

If you have any questions or comments about this project, please feel free to contact me at LinkedIn.

this ReadMe is written by ChatGPT :)

sorting_algorithms's People

Contributors

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