Second state which does not include current index
ans = Math . max ( ans , findLongest ( a , n , present + 1 , previous ) ) ; } else { var h1 = a [ previous ] [ 0 ] ; var h2 = a [ present ] [ 0 ] ; var w1 = a [ previous ] [ 1 ] ; var w2 = a [ present ] [ 1 ] ;