Array Questions
Array Questions
1
5. ARRAY - LEAST SURPASSER
Given integer array, replace every element with least greatest element on the right. If there are no
greater numbers, then place the same number.
Input: [10, 12, 5, 40, 21, 70, 1, 49, 37]
Output: [12, 21, 21, 49, 37, 70, 37, 49, 37]
2
Input:
Input String: "Hello"
CharacterToRemove: 'l'
Output: "Heo"
3
Output: "efghabcd"
4
Input: Input String: "Mike"
Output: "iMek"
Input String: "break"
Output: "rbeka"