DEV Community

Discussion on: Circular Queue using python..!

Collapse
 
bdelespierre profile image
Benjamin Delespierre • Edited
class CircularQ:
    def isEmpty(self, value):
        return self.top and self.star == -1

    def isFull(self):
        return (self.top+1 == self.maxSize and self.start == 0)\
            or (self.start+1 == self.top)
Enter fullscreen mode Exit fullscreen mode

Sorry couldn't help myself πŸ˜…

Collapse
 
rohitbrk profile image
rohit-br-k

that's cool broπŸ˜‚

Collapse
 
thumbone profile image
Bernd Wechner

In the original article just use three backticks followed by py, as in:

```py
your python code here
```
Enter fullscreen mode Exit fullscreen mode
Collapse
 
rohitbrk profile image
rohit-br-k

thank you for sharing this information...!!😊