Flipkart Interview Question

Implement next_permutation functionality in C. Print the zig-zag order of a Binary Tree