Given a list,rotate the list to right by k places, where k is nonegative.

Given a list,rotate the list to right by k places, where k is nonegative.code 給定一個列表,將列表向右旋轉K個位置,其中K是非分隔的。ast ListNode *rotateRight(ListNode *head, int k) { if (head == NULL || k < 0) return NULL;
相關文章
相關標籤/搜索