Question 6

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], [5], [7,8,9]

[advanced_iframe securitykey=”undefined” src=”” width=”100%” height=”600″]

KodNest Training New Batch is starting on 19th October 2020. Attend one week free demo classes.Register Now

New Report