reorder list: this problem is quite interesting and important for list operations