Skip to content

Instantly share code, notes, and snippets.

View lmcdonough's full-sized avatar

Levi McDonough lmcdonough

View GitHub Profile
@lmcdonough
lmcdonough / reverse_linked_list.py
Created December 3, 2024 17:23
Reverse A Singly Linked List (with inline comments and example)
'''
Correct Approach to Reverse a Singly Linked List:
The process involves 3 main pointers:
1. PREV: Starts as None and eventually becomes the new head.
2. CURRENT: The node currently being processed.
3. NEXT_NODE: Keeps track of the next node in the list to avoid losing it
during the reversal.
@lmcdonough
lmcdonough / npmcrashcourse.txt
Created March 1, 2022 22:49 — forked from bradtraversy/npmcrashcourse.txt
NPM Crash Course Commands
# GET VERSION
npm -v (or --version)
# GET HELP
npm help
npm
# CREATE PACKAGE.JSON
npm init
npm init -y (or --yes)