STL Implementation of Stack


STL implementation of Stack

STL Implementation of Stack in C/C++

Stack::push
Adds elements in Stack

Stack::pop
Deletes top elements from Stack

Stack::Empty
Checks whether Stack empty or not

Stack::Top
Retrieves top elements from Stack, but doesn’t delete anything.

Stack::Size
Returns the number of elements in Stack.

Unfortunately this method is slower than our custom method.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s