Concept Flow - Delete Node by Value
Start at head
Check if head is null?
Yes→Stop: List empty
No
Check if head value == target?
Yes→Delete head, update head
No
Traverse list with prev and current
Check current value == target?
Yes→Delete current by linking prev to current.next
No
Move prev and current forward
Back to Check current value
Reached end?
Yes→Stop: Value not found
↩Back to Check current value
Start from the head node, check if it matches the value to delete. If yes, remove head. Otherwise, traverse the list to find the node and remove it by linking previous node to next node.
