write a method to decide if one string is a permutation of the other

sort two strings
write a method to rotate an image by 90 degrees