India’s Best Job Seekers and Training Platform Forums Data Structure Write a function that accepts root of a binary tree and print zigzag …

  • Write a function that accepts root of a binary tree and print zigzag …

     Akash  updated 11 months, 3 weeks ago 1 Member · 1 Post
  • Akash 

    Administrator
    at

    Write a function that accepts root of a binary tree and print zigzag level order traversal, each level print in new line.
    For example,
    Given tree:
    1
    2 3
    4 5 6 7
    8 9
    output:
    1
    2 3
    7 6 5 4
    8 9

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
KodNest Training New Batch is starting on 02nd November 2020. Attend one week free demo classes.Register Now

New Report

Close