From d7d69ecaf8f65478fe3c3f7cab05ecce7b594ece Mon Sep 17 00:00:00 2001 From: Oleksii Shtanko Date: Wed, 11 Dec 2024 22:36:52 +0000 Subject: [PATCH] Add kotlin doc --- README.md | 30 +++++++++---------- .../algorithms/sorts/BottomUpMergeSort.kt | 11 +++++++ 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index b6e1452..7c621b9 100644 --- a/README.md +++ b/README.md @@ -3,20 +3,20 @@ A repository that organizes various data structures, algorithms, and solutions to problems in Kotlin in a structured format

- Build - Codebeat - CodeFactor - Codacy Badge - Hits-of-Code + Build + codebeat badge + CodeFactor + Maintainability + Codacy Badge + Hits-of-Code License: MIT - FOSSA Status + FOSSA Status CodeStyle - Kotlin Version - codacy test coverage - Maintainability - codeclimate test coverage - codecov test coverage - Coverage Status + Kotlin Version + codacy test coverage + codeclimate test coverage + codecov test coverage + Coverage Status


## Overview @@ -57,13 +57,13 @@ optimizations. ## Complexity Report -* 7,633 lines of code (loc) +* 7,644 lines of code (loc) * 3,710 source lines of code (sloc) * 2,870 logical lines of code (lloc) -* 3,361 comment lines of code (cloc) +* 3,372 comment lines of code (cloc) * 427 cyclomatic complexity (mcc) @@ -79,4 +79,4 @@ optimizations. ## Findings (0) -generated with [detekt version 1.23.7](https://detekt.dev/) on 2024-11-01 19:30:41 UTC +generated with [detekt version 1.23.7](https://detekt.dev/) on 2024-12-11 22:35:45 UTC diff --git a/src/main/kotlin/dev/shtanko/algorithms/sorts/BottomUpMergeSort.kt b/src/main/kotlin/dev/shtanko/algorithms/sorts/BottomUpMergeSort.kt index cb3e05f..76dd8ad 100644 --- a/src/main/kotlin/dev/shtanko/algorithms/sorts/BottomUpMergeSort.kt +++ b/src/main/kotlin/dev/shtanko/algorithms/sorts/BottomUpMergeSort.kt @@ -55,6 +55,17 @@ data object BottomUpMergeSort : Sortable { } } + /** + * Merge two sub-arrays of array[]. + * + * @param array the array to be sorted + * @param tempArray the temporary array used for merging + * @param start the start index of the first sub-array + * @param middle the end index of the first sub-array + * @param end the end index of the second sub-array + * @param the type of elements in the array + * @return the merged array + */ private fun > merge( array: Array, tempArray: Array,