Plus One Linked List
Difficulty: Medium
Category: DSA
Topics: Linked List, Math
Asked at: Google, Amazon
You are given the head of a non-empty singly linked list `head`, where each node contains a single digit (`0-9`). The digits are stored in forward order, meaning the most significant digit comes first. The linked list represents a non-negative integer.
Your task is to add **one** to this integer and return the head of the resulting linked list. The solution must handle any necessary carry-over, including cases where the number of digits increases.
Return the head of the updated linked list.