I was asked in an interview to implement queue using single stack and I was able to do it, but I was wondering if the same can be achieved by using yield as well?
Based on the comments above, I would say no, It is not possible to use a single stack and yield for this.
As the OP stated, he used recursion to inverse the stack (get the bottom of it). So this is basically the same as what is being given as solution in questions asking to implement a queue using two stacks: How to implement a queue using two stacks? because the runtime stack is used as the second stack.
While it is always possible to rewrite a recursive method to use iteration instead (see any books on theoretical computer science), this is just what is forbidden for the solution of this task, because it would require another datastructure of the same size to keep the data. We need to use iteration to be able to use yield.