Pointer reversal
Reverse a singly linked list
Reverse a list in place by moving links one at a time and explain which variables must be preserved before reassignment.
Advanced Topics in Computer Science
Students move beyond array-backed collections and learn how references can connect nodes into flexible linear structures.
Unit Focus
The emphasis is on pointer/reference reasoning, diagrams, edge cases, and implementation from first principles.
Practice Work
Implement a custom linked list with add, remove, contains, and reverse operations.
Use diagrams to debug reference bugs before changing code.
DSA Assignment Bank
Code Scholars provides structured assignments, implementation support, edge-case review, and runtime analysis coaching so students learn the concept rather than only memorizing a solution.
Pointer reversal
Reverse a list in place by moving links one at a time and explain which variables must be preserved before reassignment.
Fast and slow pointers
Use two references moving at different speeds to decide whether a list contains a cycle.
Cycle entry logic
After detecting a cycle, find the node where the cycle starts and justify why the second phase works.
Two-list traversal
Combine two sorted linked lists into one sorted list without creating new data nodes.
Two-pointer gap
Use two references with a fixed gap so a node can be removed in one pass.
Fast and slow pointers
Return the middle node of a linked list and define the expected result for even-length lists.
Stable partitioning
Rearrange nodes so values below a pivot appear before the others while preserving relative order within each group.
Adjacent comparison
Given a sorted linked list, remove repeated values while keeping one copy of each value.
Sentinel node
Given a sorted linked list, remove every value that appears more than once, using a sentinel to handle head removals.
Carry handling
Add numbers represented by reversed digit lists and produce a new list with correct carry propagation.
Reverse second half
Determine whether a linked list reads the same forward and backward without converting the entire list to a string.
Split, reverse, merge
Transform a list so nodes alternate from the front half and reversed back half.
Length and reconnect
Move the last k nodes to the front after computing length and handling k larger than the list length.
Local pointer rewiring
Swap every adjacent pair of nodes without changing stored values.
Group reversal
Reverse nodes k at a time and leave the final short group unchanged.
Reference identity
Given two singly linked lists that may share node objects, find the first shared node by reference.
Mapping nodes
Copy a linked structure where each node has next and extra references while preserving relationships.
Merge sort on lists
Sort a linked list using split and merge rather than random indexing.
Sorted prefix
Build a sorted linked list by inserting each original node into the correct position.
Value and link copy
Explain when copying the next node data works and why it fails for the final node.
Depth-first linking
Flatten nodes that may have child lists into a single linked list in depth-first order.
Edge cases
Implement addFirst, addLast, removeFirst, and removeLast while handling empty and one-node lists.
Custom list API
Create an iterator over a custom linked list that supports hasNext and next without exposing node references.
ADT implementation
Use linked nodes to implement enqueue and dequeue while preserving O(1) access to both ends.
ADT implementation
Use linked nodes to implement push, pop, and peek with correct empty-list behavior.
Mutation while traversing
Remove every node whose value matches a condition without skipping nodes or losing the remaining list.
Pointer construction
Split one list into two lists by alternating nodes and preserving original node order.
Run processing
Given a sorted linked list, replace each run with one node storing value and count.
Pointer trace
Given a flawed insert method, identify the exact assignment that loses the rest of the list.
DSA support
Design a practice assignment that requires diagrams, implementation, edge-case tests, and runtime explanation.
Work through the concepts, code, edge cases, and runtime analysis with 1:1 guidance.