[[[generate]]] {{{0}}} Write Kotlin code that implements this function and name it `solution`. Also, write tests for this function. Finally, create 3 files: 1. `src/main/kotlin/Solution.kt` (contains the implementation of the function) 2. `src/test/kotlin/SolutionTest.kt` (contains the implementation of the tests) 2. `build.gradle` (contains information about the project and dependencies, gradle tool already installed on the system) You need to build this code and run the tests. Formulate the solution in the following format: **build.gradle** ```gradle Contents of build.gradle file ``` **src/main/kotlin/Solution.kt** ```kotlin Contents of src/main/kotin/Solution.kt file ``` **src/test/kotlin/SolutionTest.kt** ```kotlin Contents of src/test/kotlin/SolutionTest.kt file ``` **Compile** ```bash Commands for compile code with tests (gradle command not gradlew) ``` **Test** ```bash Commands for running tests (use gradle command not gradlew) ``` In the end, there will be 5 blocks: build.gradle, "src/main/kotlin/Solution.kt","src/test/kotlin/SolutionTest.kt", Compile, Test [[[rewrite]]] **build.sbt** ```gradle {{{0}}} ``` **src/main/kotlin/Solution.kt** ```kotlin {{{1}}} ``` **src/test/kotlin/SolutionTest.kt** ```kotlin {{{2}}} ``` ```bash {{{3}}} ``` ```console {{{4}}} ``` ```bash {{{5}}} ``` ```console {{{6}}} ``` {{{7}}} Rewrite Kotlin code that implements this function and name it `solution`. Also, rewrite tests for this function. Finally, create 3 files: 1. `src/main/kotlin/Solution.kt` (contains the implementation of the function) 2. `src/test/kotlin/SolutionTest.kt` (contains the implementation of the tests) 2. `build.gradle` (contains information about the project and dependencies, gradle tool already installed on the system) You need to build this code and run the tests. Formulate the solution in the following format: **build.gradle** ```gradle Contents of build.gradle file ``` **src/main/kotlin/Solution.kt** ```kotlin Contents of src/test/kotlin/Solution.kt file ``` **src/test/kotlin/SolutionTest.kt** ```kotlin Contents of src/test/kotlin/SolutionTest.kt file ``` **Compile** ```bash Commands for compile code with tests (use gradle command not gradlew) ``` **Test** ```bash Commands for running tests (use gradle command not gradlew) ``` In the end, there will be 5 blocks: build.gradle, "src/main/kotlin/Solution.kt","src/test/kotlin/SolutionTest.kt", Compile, Test