Skip to content

extend insertionsort#5

Merged
FaSe22 merged 26 commits into
mainfrom
extend-insertionsort
Nov 22, 2024
Merged

extend insertionsort#5
FaSe22 merged 26 commits into
mainfrom
extend-insertionsort

Conversation

@dimitrijjedich
Copy link
Copy Markdown
Collaborator

This RP extends the class InsertionSort, which was renamed in the same place.

The new sorting algorithm was implemented with the same technique als already used in Bubblesort to have a single sort method which accepts a parameter to decide which variant to use and having variant1 as a default.

❗ Since the class was renamed, some other files needed change and i was not able to determin if this changes where correct and the setup still works.

The new algorithm

The new Approach of the sorting algorithm starts at the beginning and loops over the whole array, starting from the outer loops current postion, to find the smallest numer. The found number gets safed and replaced when needed. After the inner loop has ended, the so found number can switch places with the current outer index and the process repeats itself, now with one element less to sort.

@dimitrijjedich dimitrijjedich requested a review from FaSe22 October 18, 2023 21:06
@dimitrijjedich dimitrijjedich self-assigned this Oct 18, 2023
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@sonarqubecloud
Copy link
Copy Markdown

@FaSe22 FaSe22 merged commit dd60190 into main Nov 22, 2024
@dimitrijjedich dimitrijjedich mentioned this pull request Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants