← Pointer Manipulation

Micro-Drill #19 — Create a node

Pointer Manipulation Target: 5s

The node class is the foundation for all linked list operations. Know the constructor cold.

class Node:
    def __init__(self, val, nxt=None):
        self.val = val
        self.next = nxt

Type it from memory. Go.

Practice Problems

Related Coding Drills

← Micro #18 Micro #20 →