# Implement Stack Using Queues

Implement a LIFO stack using queues.

## Statement

Given a Queue class with common operations such as `enqueue()`

, `dequeue()`

, and `size()`

, implement a `Stack`

class with `push()`

, `pop()`

, and `isEmpty()`

operations. The `isEmpty()`

function should return `true`

if the stack is empty and ` false`

otherwise.

Note: If the stack is empty, the`pop()`

function should return $-1$.

A **stack** is a data structure in which objects are inserted and removed according to the

: Inserts an item at the top of the stack.`push()`

: Removes an item from the top of the stack and returns it.`pop()`

A **queue** is a data structure in which objects are inserted and removed according to the

: Inserts an item at the back of the queue.`enqueue()`

: Removes an item from the front of the queue and returns it.`dequeue()`

### Sample input

```
Push(7), Pop(), Push(9), Push(10), Pop(), IsEmpty()
```

### Expected output

```
7, 10, false
```

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.