top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Invert a binary tree which consists of 0 or 1 in the way, where each node value is a LOGICAL AND between its children?

+2 votes
362 views

You have a binary tree which consists of 0 or 1 in the way, that each node value is a LOGICAL AND between its children:

      0
   /    \
  0      1
 / \    / \
0   1  1   1

You need to write a code, which will invert given LEAF and put tree in a correct state.

Note: Received by some user over whatsapp, sharing in exact form?

posted May 24, 2017 by Salil Agrawal

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

...