FastPrepMake Towers Strictly Increasing or Decreasing

Make Towers Strictly Increasing or Decreasing

Roblox logoRobloxâ—Ź MediumINTERNOA
Learn

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

See Roblox hiring insights
public int makeTowa(int[] towers) {
  // write your code here
}
towers[1, 4, 3, 2]
expected4
Checking account…