You need to reverse all the arrows. Instead of → , you want → . To do this, you need to track three things at each step: - The previous node (where the current node should point) - The current node (the one you're reversing) - The next node (so you don't lose the rest of the list) Process each node by pointing it to the previous one, then move all pointers forward.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/maang-interview-prep/linked-lists/reverse-linked-list-hint
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████████████████████████████████████████████████████████████████████████████