Max End 3
Challenge:
Given an array of ints figure out which is larger, the first or last element in the array, and set all the other elements to be that value.
Try it out:
Repeat Front
Challenge:
Given a string and an int n, return a string made of the first n characters of the string, followed by the first n-1 characters of the string, and so on. You may assume that n is between 0 and the length of the string, inclusive (i.e. n >= 0 and n <= str.length()).
Source: Stanford CodingBat
Try it out: