upGrad interview question

Binary Search Implements stack using queue