Definition for singly-linked list.
Warning
This post is more than a year old. Information may be outdated.
Solved at: 220925
Question
Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the binary representation of a number.
Return the decimal value of the number in the linked list.
The most significant bit is at the head of the linked list.
Solution
Comments