Pergunta de entrevista da empresa Visa Inc.

How can you show that a binary search tree is is the same if you reflect it across its root

Respostas da entrevista

Sigiloso

3 de mai. de 2016

This is an incorrect question. It should be just Binary tree and not BST

1

Sigiloso

21 de dez. de 2016

void swap_node(Node n) { if(n! = null) { node temp = n.left; n.left = n.right; n.right = temp; swap_node(n.left); swap_node(n.right); } } swap_node(root);