Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.28 KB

Linked_Lists.md

File metadata and controls

45 lines (29 loc) · 1.28 KB

Linked Lists

Students should be given a notation like this:

Node
	Data
	Next

SinglyLinkedList
	Head

and a brief explanation of linked lists. Diagrams should be drawn.

##Goals##

##Resources##

##Find Tail## Given a singly linked list, implement a method that returns the tail (last node, whose "next" attribute points to None).

##Find Length## Given a singly linked list, return the count of nodes in the linked list. Assume the list is not circular and contains no loops.

##Find Index## Given a singly linked list and an index, return the node at that index.

##Insert## Given a singly linked list, an index, and a node, insert the node at the specified index.

##Delete## Given a singly linked list and an index, delete the node at the specified index, while not losing the rest of the list.

##Find Circles## Given a singly linked list, return True if the list is circular. Return False if it is not. A list is circular if any node points at the node referenced by SinglyLinkedList.head.

##Find Loops## Given a singly linked list, return True if any node points to a previous node in the list.

##Find Kth Element## Given a singly linked list and a number K, return the Kth element from the end in the list. If there are fewer than K elements in the list, return False.