Tag: Linked list

  1. Leetcode 21 Merge Two Sorted Lists

    Problem 21 Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Not a hard one. But I spend a lot of time on this, cause I misunderstand…

    on Leetcode Java Linked list

  2. Leetcode 2 Add Two Numbers

    Problem 2 Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 ->…

    on Leetcode Linked list Math