Pregunta de entrevista de SAP Ariba

Write an algorithm to display a tree of data in multiple sorting orders.