Kotlinlearncs.online LogoJava
Return to List

Solve: Min Cat

Imported By: Geoffrey Challen
/ Version: 2021.6.0

Given two non-null Strings, concatenate them and return the result. However, if the Strings are different lengths, omit chars from the front of the longer string so it is the same length as the shorter string. So "Hello" and "Hi" yield "loHi". The strings may be any length.

fun minCat(
first: String,
second: String,
): String {
return "" // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: