CS Interview Prep: Add Two Numbers, Leetcode #2 — Java

I found this question to be challenging, but doable. In order to solve this question, you need to have some pre-requisite knowledge.

Prerequisite Knowledge

Can you answer these questions?

  1. If you have the following ListNode class:
public class ListNode {
int val;
ListNode next;
ListNode() {}
ListNode(int val) { this.val = val; }
ListNode(int val…