Git Product home page Git Product logo

apa's Introduction

APA

APA activity. Implementation of sorting methods: Selection Sort, Insertion Sort, Quick Sort, Merge Sort, Heap Sort, Counting Sort and Radix Sort.

How to use it!

  • The compilation of the file is as simple as it follows: Go straight to the root of the project using the terminal and enter the command make.

  • In order to run the program properly, you must run it from the terminal by typing the following parameters according to which sorting method and which way to select the numbers you want to use: ./SortingNumbers "1st param" "2nd param" "3rd param" "4th param"

  • The parameters must be chosen as it follows:

    • 1st: "-sort".
    • 2nd: "-s", "-i", "-q", "-m", "-h", "-c" or "-r" indicating Selection Sort, Insertion Sort, Quick Sort, Merge Sort, HeapSort, Counting Sort or Radix Sort, respectively.
    • 3rd: "-r", "-c" or "-f" indicating Random Selection, Chosen Selection or Reading From File Selection of numbers.
    • 4th(Optional): "Integer Number" indicating how many numbers you want to sort. In case you are reading from file ("-f" argument), the number of numbers inputed must be at the beginning of it.

Examples of usage

  • ./SortingNumbers -sort -s -r 10 ---> Here you will sort an amount of 10 numbers chosen randomly by using the Selection Sort method.
  • ./SortingNumbers -sort -i -c 20 ---> On the other hand, you will have to choose 20 numbers that will be sorted by the Insertion Sort method.
  • ./SortingNumbers -sort -i -f < file.txt --> Reading from a file (a .txt file for example), the argument that succeds "<" must be the file path (in the example the file is in the root of the project).

apa's People

Contributors

thiagofsr97 avatar

Stargazers

 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.