You are given a double linked list and an array of pointers to elements in this list (no assumptions can be made on the array – number of pointers, order and duplicates allowed).
Return the number of sequences of elements (groups of consecutive elements), pointed by the array.
For example, if this is the array (number relates to index in the list, not the actual pointer value): 9,1,3,7,8,5,2.
Then output is 3, representing these sequences: [1,2,3], , [7,8,9]
[advanced_iframe securitykey=”undefined” src=”https://code.kodnest.com/” width=”100%” height=”600″]