_implement_queue_using_stacks

package
v0.0.0-...-6ad7fa7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 0 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

Constructor Initialize your data structure here.

func (*MyQueue) Empty

func (this *MyQueue) Empty() bool

Empty Returns whether the queue is empty.

func (*MyQueue) Peek

func (this *MyQueue) Peek() int

Peek Get the front element.

func (*MyQueue) Pop

func (this *MyQueue) Pop() int

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

func (*MyQueue) Push

func (this *MyQueue) Push(x int)

Push Push element x to the back of queue.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL