give unsorted array integer num return length long consecutive element sequenceyou write algorithm run on time Example 1input num 1004200132output 4explanation the long consecutive element sequence 1 2 3 4 therefore length 4example 2input num 0372584601output 9 constraints0 numslength 105109 numsi 109