implement_queue_using_stacks

package
Version: v0.0.0-...-5dadc16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyQueue

type MyQueue struct {
	// contains filtered or unexported fields
}

func Constructor

func Constructor() MyQueue

* Initialize your data structure here.

func (*MyQueue) Empty

func (this *MyQueue) Empty() bool

* Returns whether the queue is empty.

func (*MyQueue) Peek

func (this *MyQueue) Peek() int

* Get the front element.

func (*MyQueue) Pop

func (this *MyQueue) Pop() int

* Removes the element from in front of queue and returns that element.

func (*MyQueue) Push

func (this *MyQueue) Push(x int)

* Push element x to the back of queue.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL