Assetsoft interview question

Implement a C# function to do an easy leetcode.