Pergunta de entrevista da empresa Amazon

Write a program to verify whether the given tree is a binary search tree or not without using recursions