Welcome,
%1$s
. Please
login
or
register
.
December 12, 2017, 12:28:40 AM
Submit
Quotes
CELL TRACKER
Online Fun Database

Interview Questions

C Questions

The Constant LIFO
Random
Celebrities
Places
Humour
Quotes
Informative
Articles
Stories
Indian
Videos
Puzzles
Easy
Medium
Tough
On Maths and Physics
What am I?
Puzzled PJs
« previous
next »
:
1
: The Constant LIFO ( 1354 )
The Constant LIFO
«
:
January 22, 2008, 10:14:25 AM From
thequark
»
The Constant LIFO
Design a data structure and associated algo/logic/pseudo code for a data structure such that it is a LIFO (Last In First Out).
The constraint is that data addition, removal should be in constant time i.e. the time taken or number of instructions taken should not depend on size of data structure or input value. The data to be stored are numbers. Additionally the data structure should also provide a facility of finding the minimum number out of all the added to it so far.
You can assume that the data structure has an upper limit on elements it can store. This rule is not necessary but if it helps you to ease the problem then use it. (It doesnt make much difference though)
Liked It? Share it!
Tweet
:
1
« previous
next »
Best Rated
List All>>
Latest
Random
Loading...