Could someone please explain where these 3 integers come from in this problem? **NO SOLUTIONS PLS**
I'm looking at the list node class and it has an int value, but the question is saying that ListNode l1 has the values [2,4,3]. I don't understand. The structure doesn't make any sense to me. Could someone please explain? I haven't used linked lists before, I only know what they are at a surface level

11 Replies
Please no solutions to the actual problem though, I'd like to solve that myself!
are you familiar with how linked lists work?
All I really know about them is that the elements point to the next in the linked lists, not much else
right, so if you're given the head node to a list containing [2, 4, 3] you will have to traverse the list by reading the value from the head node, going to the next node, getting the value from that node, going to the next node, and so on
That much I understand
well, that's where the values come from
I guess maybe I misread the question - I thought somehow ListNode l1 was equal [2,4,3]
i mean, that linked list does contain those numbers but you're only given a reference to the first node in the list
i think thats where i got tripped up
glad i read this before i hit enter :PepeLaugh:
@Jimmacle thanks for the help!