On a whiteboard, implement a function called tripleRotate, which "rotates" all subsequent sets of 3 elements in an array, when the algorithm for one rotation is as follows: Given the triplet ['a', 'b', 'c'], the 1st element ('a') is moved to index 1, the 2nd element ('b') is moved to index 2 and the 3rd element ('c') is moved to index 0. Thus, one rotation of the given triplet results in the new array ['c', 'a', 'b']. Any programming language and data types could be used, although they did expect actual code, not pseudocode. No additional information was given so lots of additional questions about corner cases and requirements were expected to be asked by the applicant. Prepare to explain your chosen approach and used data types.