Traversal
Everything on SkillVeris tagged Traversal — collected across the glossary, study notes, blog, and cheat sheets.
9 resources across 2 libraries
Study Notes(2)
Interview Questions(7)
What is a Doubly Linked List?
A doubly linked list is a sequence of nodes where each node stores a value plus pointers to both the next and the previous node, allowing traversal in either d…
How Do You Detect a Cycle in a Linked List?
You detect a cycle in a linked list by walking it with two pointers moving at different speeds — a slow pointer advancing one node at a time and a fast pointer…
What is Floyd’s Cycle Detection Algorithm?
Floyd’s cycle detection algorithm, also called the tortoise-and-hare algorithm, finds whether a linked structure contains a cycle and, with a second phase, loc…
How Do You Find the Middle of a Linked List?
You find the middle of a linked list in a single pass using the slow-fast pointer technique: advance a slow pointer one node at a time and a fast pointer two n…
How Do You Clone a Linked List with a Random Pointer?
You clone a linked list where each node has both a next pointer and a random pointer (which may point anywhere in the list or to null) by first mapping every o…
How Do You Flatten a Multilevel Linked List?
You flatten a multilevel doubly linked list, where nodes can have a child pointer to a separate sublist in addition to next and prev, by depth-first traversal:…
What is the Iterator Pattern?
The Iterator pattern provides a standard way to access the elements of a collection sequentially without exposing its underlying representation, using a separa…