Determin the sub string of a string
Rotate the matrix