Question d’entretien chez SAP

Find longest zigzag path in a given binary tree