The rotation problem occured when did compare pointer instead of the value of size...