Infosys Interview Question

Programming on nodes reordering in any language