_implement_stack_using_queues

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 MyStack

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

func Constructor

func Constructor() MyStack

Constructor Initialize your data structure here.

func (*MyStack) Empty

func (this *MyStack) Empty() bool

Empty Returns whether the stack is empty.

func (*MyStack) Pop

func (this *MyStack) Pop() int

Pop Removes the element on top of the stack and returns that element.

func (*MyStack) Push

func (this *MyStack) Push(x int)

Push /** Push element x onto stack. */

func (*MyStack) Top

func (this *MyStack) Top() int

Top Get the top element.

Jump to

Keyboard shortcuts

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