## Concept explanation A **linked list** is a chain of separate **nodes**, where each node stores its own value and a reference to the **next** node. Unlike an array, the items are not treated as one solid block; each card only “knows” where to go next. That is why the glowing outgoing arrow matters: it shows the one connection a node carries, and the last node ends with `null`, meaning the chain stops there. ## What you see You’re looking at five large nodes arranged in a row. Each card holds a value, and the arrows between cards show the one-way links from one node to the next. When you focus a card, only its outgoing connection lights up, so you can see that the selected node points forward but does not contain the whole list. Hovering an arrow strengthens that connection visually so the direction is easier to notice. ## Try it yourself - **Click different cards** and notice that the highlight moves with your selection while only that card’s outgoing link glows. - **Hover over an arrow** to emphasize the direction from one node to the next. - **Move the focus slider** to step through the list in order and compare each node’s single outgoing connection. - **Use the dropdown** to jump directly to a specific node and see which link belongs to it. - **Select the last card** and observe that its connection ends at `null`, showing there is no next node after it. - **Press Reset focus** to return to the starting node and trace the chain again from there. ## Concept explanation In a **linked list**, the order of items is defined by each node’s **next link**, not by where the nodes happen to sit on the screen. Even if the cards are scattered or curved into an unusual arrangement, the list still begins at the **head** and continues by following the arrows from one card to the next until it reaches the **tail**. ## What you see You’re looking at the same labeled cards placed in a spread-out layout so their physical positions do not suggest a simple left-to-right order. The arrows show the true sequence, and the moving marker demonstrates traversal by traveling along those links from card `A` to card `E`, highlighting that the path comes from the connections rather than the layout. ## Try it yourself - **Press `Start`** and watch the marker move node by node along the arrows. - **Notice** that the cards are not lined up neatly, but the traversal still follows the same list order. - **Press `Reset`** to return the marker to the beginning and replay the traversal. - **Adjust the `Scatter layout` slider** to change the visual arrangement, then **press `Start` again** and compare the path. - **Ask yourself** which card comes next by arrow direction before the marker reaches it. ## Concept explanation A **linked list** stores items in separate nodes, and each node points to the next one. To **reverse** the list, you do not move the cards or swap their values. Instead, you change each pointer so it goes the opposite way. As more links are redirected, the **head** of the list changes to the node that now comes first in the reversed chain. ## What you see You are looking at five cards in a row with arrows showing how each node connects to the next. Blue arrows still point in the original forward direction, while red reversed arrows show links that have already been flipped. The gold head marker moves along the chain to show which card has become the front of the partially reversed list. ## Try it yourself - **Drag the `reversal progress` slider** from `0` upward and watch one link at a time switch direction. - **Pause at `1`, `2`, or `3`** to notice that some arrows are reversed while the remaining ones still point forward. - **Watch the head marker** as you move the slider and see that the front of the list changes because of pointer updates. - **Compare the card labels before and after** and notice that `A`, `B`, `C`, `D`, and `E` never move or swap places—the connections are what change. - **Move the slider all the way to `4`** to see the fully reversed list, where every arrow points backward. ## Concept explanation A **linked list** is a chain where each card stores a connection to the next one. During **reversal**, the whole chain does not flip all at once. Instead, you change one outgoing link at a time: the **current** card saves where it was pointing, redirects its arrow backward to the already-reversed part, and then the current position moves forward to the next unreversed card. ## What you see You are looking at a horizontal row of cards connected by arrows. Blue arrows still point in the original forward direction, gold arrows show links that have already been reversed, and the teal highlight marks the current card whose outgoing pointer is about to change. The pointer panel helps you track `prev`, `current`, and the saved next card as the algorithm progresses one step at a time. ## Try it yourself - **Click `Next Step`** once and notice that only the teal card’s arrow changes direction. - **Click `Next Step` repeatedly** to watch the current highlight move one card to the right after each reversal. - **Compare the arrow colors** to see the boundary between the reversed part and the unreversed part. - **Use the `Cards` slider** before starting to switch between `4`, `5`, or `6` cards and observe that the same step-by-step process still works. - **Press `Reset`** and then step through again, paying attention to how `prev`, `current`, and saved next change after each click. ## Concept explanation When you reverse a **linked list**, each card only knows how to reach the one after it. If you flip that arrow too early, you can lose the rest of the chain. Keeping three references — **previous**, **current**, and **next** — solves this safely. `current` is the card you are changing, `previous` is the part already reversed, and `next` temporarily remembers where the unreversed remainder begins so you can keep going after the arrow is flipped. ## What you see You’re looking at a row of five linked-list cards. The white arrows show the list’s present connections, while gold arrows appear once a link has been reversed. Above the cards, the colored markers track `previous`, `current`, and `next`, moving step by step as the algorithm progresses. When a marker points to `null`, it means that reference is intentionally empty at that moment. ## Try it yourself - **Click `Step`** once and notice that `next` has already preserved access to the remaining cards before `current` changes direction. - **Keep clicking `Step`** and watch `current` move forward one card at a time while the reversed section grows behind it. - **Hover over `previous`, `current`, or `next`** to read a plain-language explanation of that marker’s job. - **Compare the gold reversed arrow with the teal `saved next` guide** to see how one pointer flips backward while the other still protects the unreversed remainder. - **Click `Reset`** and replay the process until you can predict where all three references will move next. ## Concept explanation When you reverse a **linked list**, each card points to the next one in the chain. The key danger is that as soon as you change the current card’s arrow, you may lose your only path to the **unreversed remainder** of the list. That is why the safe procedure is to first save the current node’s original `next` reference in a temporary variable, then flip the arrow, and only then move forward. If you reverse immediately without remembering where the list continues, the rest of the chain becomes unreachable. ## What you see You are looking at one step of list reversal with the **current** card enlarged. Its original forward link is highlighted, and the cards to the right are shaded as the still-to-process segment. In the safe mode, the visual marks the saved next card before the pointer change. In the unsafe mode, reversing first causes the remaining chain to fade and appear disconnected, showing that the algorithm has lost track of where to continue. ## Try it yourself - **Drag the white knob** toward **remember next first** and then **press Step** to watch the safe sequence save the next card before changing the pointer. - **Press Step again** in the safe mode and notice that the process can continue because the next position was preserved. - **Drag the knob** to **reverse immediately** and **press Step** until the flip happens. - **Notice how** the cards still waiting on the right fade away, showing that the rest of the list is no longer reachable. - **Press Reset** and compare both modes again until you can explain why storing `next` must happen before reversing the arrow. ## Concept explanation A **linked list reversal** changes every pointer so each node points to the node that used to come before it. As that happens, the **original head** gradually loses its outgoing link and becomes the tail of the reversed list, while the **original tail** eventually becomes the **new head**. The key idea is that the algorithm grows a reversed, processed chain one node at a time while shrinking the untouched forward chain. ## What you see You’re looking at six cards that represent list nodes. Blue arrows show links that still point in the original direction, while teal arrows show links that have already been flipped. The highlighted labels track which node is the **old head**, which node is currently acting as the **new head** of the processed portion, and which node is the **current** or **next** node during the algorithm. The status box helps you follow the pointer movement as the reversal unfolds. ## Try it yourself - **Press `Play`** to watch the full reversal happen automatically from the original list to the fully reversed list. - **Press `Pause`** at any moment to freeze the algorithm and inspect which arrows have already flipped. - **Press `Step`** repeatedly to move through the reversal one stage at a time and see the processed portion grow. - **Watch the `new head` label** move rightward during the process until it lands on node `6`, showing that the old tail has become the new head. - **Notice the first card** as the links reverse; it keeps the `old head` label and ends as the tail of the final chain. - **Switch the `view mode`** to compare a flatter reversed path with a more separated top path while you study the pointer changes. - **Adjust the speed slider** before pressing `Play` to make the animation slower or faster. - **Press `Reset`** to return to the original left-to-right list and replay the algorithm from the beginning.