method returns length of longest consecutive sequence rooted at node root
def longestConsecutive ( root ) : NEW_LINE INDENT if ( root == None ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT res = [ 0 ] NEW_LINE DEDENT