[LeetCode] Linked List Components

1 · · Feb. 19, 2022, 5:18 a.m.
817. Linked List Components You are given the head of a linked list containing unique integer values and an integer array nums that is a subset of the linked list values. Return the number of connected components in nums where two values are connected if they appear consecutively in the linked list. ...