add remove nth from list end and rotate head to nth list end