Tags » Linked List

Given a list, rotate the list to the right by k places, where k is non-negative.

For example:
Given 1->2->3->4->5->NULL and k = 2, 12 more words

Two Points

Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.

If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is. 60 more words

Linked List

24. Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head.

For example,
Given 1->2->3->4, you should return the list as 2->1->4->3… 22 more words

Programming #1: List-Based Collections

A collection can be thought of as a group of things. For example, you could have a collection of toys, books, stuff in your room, etc. 1,428 more words

Programming

19. Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.

For example,Given linked list: 1->2->3->4->5, and n = 2. 18 more words

Two Points

83. Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.

For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3… 6 more words

Linked List