链表
codejeffrey
这个作者很懒,什么都没留下…
展开
-
1133 Splitting A Linked List (25分)
Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all the values in [0, K] appear before all those greater than K. The order of the elements inside each class原创 2020-05-16 21:23:06 · 118 阅读 · 0 评论 -
1074 Reversing Linked List (25分)
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, you must output 4→3→2→1→5→6. Input Specification: Each原创 2020-05-16 19:24:01 · 163 阅读 · 0 评论