solved Question 6 (rotate symmetric matrix)