Leetcode Problem of the Day Solution Follow this series to get more such content like that.
Leetcode problem link : https://leetcode.com/problems/double-...
You are given the head of a non-empty linked list representing a non-negative integer without leading zeroes.
Return the head of the linked list after doubling it.
Example 1:
Input: head = [1,8,9]
Output: [3,7,8]
Explanation: The figure above corresponds to the given linked list which represents the number 189. Hence, the returned linked list represents the number 189 * 2 = 378.
Playlist Link : • LeetCode Problem of the day
instagram link : / spiritual_coder_