Leetcode 2181 - Merge Nodes in Between Zeros [4/7/24]
HTML-код
- Опубликовано: 2 июл 2024
- Time Taken: ~15 mins
Tag: LeetCode Medium
Concept: Linked List, Array
High-level ideas:
Get a vector of the values that should be in linked list in the final answer.
E.g. for [0,1,0,3,0,2,2,0], the vector should be [1,3,4].
Construct a linked list from scratch using these values.