Skip to content

RamonBecker/SortingAlgorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorting algorithms

Project was developed in the implementation of bubble, selection and insertion sort algorithms with a low level doubly linked list.

ℹ️ Information

Sorting algorithms are algorithms that place the elements of a given sequence in a certain order. In other words, it performs its full or partial ordering. The purpose of sorting is to facilitate the retrieval of data from a list.

The implemented algorithms were:

  • Bubble Sort
  • Insertion Sort
  • Selection Sort

Bubble sort is the simplest algorithm, but the least efficient. In this algorithm each element of position i will be compared with the element of position i + 1, that is, an element of position 2 will be compared with the element of position 3. If the element of position 2 is greater than that of position 3, they they change places and so on. Because of this form of execution, the vector will have to be traversed as many times as necessary, making the algorithm inefficient for very large lists.

algoritmos-bubble-sort

Insertion sort is a simple and efficient algorithm when applied to small lists. In this algorithm, the list is scrolled from left to right, as it progresses, leaving the leftmost elements in order.

The algorithm works in the same way that people use to order cards in a card game like poker.

algoritmos-insertion-sort

Selection Sort is based on always passing the lowest value of the vector to the first position (or the highest depending on the order required), then the second lowest value to the second position and so on, up to the last two elements.

In this sorting algorithm a number is chosen from the first, this chosen number is compared with the numbers from its right, when a smaller number is found, the chosen number occupies the position of the lowest number found. This number found will be the next number chosen, if no number less than this chosen is found, it is placed in the position of the first number chosen, and the next number to its right will be the one chosen to make the comparisons. This process is repeated until the list is sorted.

algoritmos-selection-sort

⚠️ Prerequisite

Java Badge >= 11

🚀 Installation

git clone https://github.com/RamonBecker/SortingAlgorithms.git

git clone https://github.com/RamonBecker/SortingAlgorithms.git
or install github https://desktop.github.com/ 

⚡ Technologies

  • Java

📝 Developed features

  • Creation of 1 thousand, 10 thousand, 100 thousand elements
  • Ordering elements
  • Simple report generation for each sorting algorithm developed

🧑‍💻 Author

By Ramon Becker 👋🏽 Get in touch!

github linkedin Gmail Badge

About

Project was developed in the implementation of bubble, selection and insertion sort algorithms with double linked list for the data structure discipline.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages