PAT-A1074/B1025 Reversing Linked List/反轉鏈表 題目內容及題解

Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K=3, then you must output 3→2→1→6→5→4; if K=4,
相關文章
相關標籤/搜索