Convert Binary Linked List

Given a singly-linked list where each node's value is 0 or 1, interpret the list as a binary number (most significant bit at the head). Convert and return the decimal value.

Examples
Input: [1,0,1]
Output: 5
Hints

Convert Binary Linked List

Given a singly-linked list where each node's value is 0 or 1, interpret the list as a binary number (most significant bit at the head). Convert and return the decimal value.