Problem · Array

Make Towers Strictly Increasing or Decreasing

Learn this problem
MediumRoblox logoRobloxINTERNOA
See Roblox hiring insights

Problem statement

Feel free to check out the source images below to view the original statement. Thank you for understanding 🧡o🧡

Function

makeTowa(towers: int[]) → int

Examples

Example 1

towers = [1, 4, 3, 2]return = 4
Explanation is in source image :)

Example 2

towers = [5, 7, 9, 4, 11]return = 9
Explanation is in source image :)

More Roblox problems

drafts saved locally
public int makeTowa(int[] towers) {
  // write your code here
}
towers[1, 4, 3, 2]
expected4
checking account