# Don't understand what is consecutive sequence

• Hi,

Can anyone help me out?

I don't understand what does the path mean.

``````  2
\
3
/
2
/
1
``````

why 3-2-1 not a path?

THX!

• My understanding is that the sequence has to actually be Increasing from parent to child node. 3-2-1 is not increasing from parent to child, so it doesn't work.

• I am still confused. In this example, why should it be 3-4-5 instead of 1-3-4-5? it is still parent-child... and still increasing.

1

3
/
2 4

5
Longest consecutive sequence path is 3-4-5, so return 3.

• This post is deleted!

• It is not only increasing, but also consecutive, meaning the child's value is exactly one more than parent, i.e., 1 to 2 is consecutive, but 1 to 3 is not.

• Thanks for that. The description was definitely too vague!

• I agree, it's not clear, I thought may also be decreasing

• @yanggao I think it is because "consecutive" asks the sequence to be "plus 1 order" like 6-7-8-9 while not 6-8-9-10

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.