Driver Code
N = 3 NEW_LINE K = 4 NEW_LINE edges = [ [ [ 1 , 2 ] , '1' ] , [ [ 1 , 3 ] , '1' ] , [ [ 2 , 1 ] , '1' ] , [ [ 2 , 3 ] , '1' ] , [ [ 3 , 1 ] , '0' ] , [ [ 3 , 2 ] , '0' ] ] NEW_LINE constructPalindromicPath ( edges , N , K ) NEW_LINE