You are using an outdated browser. Please update your browser for a better user experience.

Conga Line Removal

lists

The night is getting late and the party is winding down. The conga line is losing its groove and a group of friends decide that they'd like to leave the line and head home.

Given linked list L which represents a conga line, and an array F of friends leaving the line, return a new linked list s

...

Linked List Cycle

lists


Given head, the head of a linked list, determine if the linked list has a cycle in it.

There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node that ta...

Merge Sorted Linked Lists

lists





Given k sorted linked lists in an array, merge them all into one single linked list that is also sorted.

Lists: [1->4->5,
1->3->4,
2->6]
Merging them into one sorted list:
1->1->2->3->4->4->5->6

Input type (Lists): Array[] Output type: Node

Node implementation:

class Nod...

Reverse Linked List

lists


Given a linked list, reverse it!


Example:
Before: 1->4->5->2
After: 2->5->4->1

Constraints:
Number of nodes in a list are between 0 and 100
Nodes only contain integers
Given a node, return the head node of the reversed list

Not exactly sure where this lands on the difficulty...