Skip to content

Commit ee301cd

Browse files
author
evitwilly
committed
added merge sort without recursion, corrected average and best times for insertion sort
1 parent dd0b8df commit ee301cd

24 files changed

+302
-151
lines changed
Binary file not shown.
Binary file not shown.

.gradle/7.1/fileHashes/fileHashes.bin

43.4 KB
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
306 Bytes
Binary file not shown.

.gradle/checksums/checksums.lock

0 Bytes
Binary file not shown.

.gradle/checksums/sha1-checksums.bin

648 Bytes
Binary file not shown.

.idea/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/Kotlin-Algorithms-and-Design-Patterns.iml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/uiDesigner.xml

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/kotlin/main.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import sorting.mergeSort
2+
3+
fun main() {
4+
val array = arrayOf(5, 4, 3, 2, 1, 0)
5+
array.mergeSort()
6+
print(array.toList())
7+
}

src/main/kotlin/sorting/InsertionSort.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ package sorting
44
* insertion sort algorithm
55
*
66
* worst time: n²
7-
* the best time: n²
8-
* average time: n
7+
* the best time: n
8+
* average time: n²
99
*
1010
* amount of time: 1
1111
*/

0 commit comments

Comments
 (0)