Level order zigzag binary

i know what i have to do but how should i use cnt in order to print a zigzag pattern , pls help ?

Ajay, you can use a bool value and pass it while you are printing tree level by level.
bool ltr=false;
for(int i=1;i<=h;i++)
{
printAtLevel(root,i,ltr);
ltr=!ltr;
}