const isPresent = (target , root)=>{
if (root === null) return null;
const result = [];
const queue = [root];
while (queue.length > 0) {
const current = queue.shift();
if(target===current.data){
return true
}
result.push(current.data);
if (current.left) queue.push(current.left);
if (current.right) queue.push(current.right);
}
return false;
}