Kotlinlearncs.online LogoJava
Return to List

Solve: Make Last

Imported By: Geoffrey Challen
/ Version: 2021.6.0

Given an IntArray, return a new IntArray with double the length with a last element with the same value as the last element of the original array and all other values 0. The original array will be length 1 or more.

fun makeLast(values: IntArray): IntArray {
return intArrayOf() // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: