Welcome, %1$s. Please login or register.

October 18, 2017, 06:23:01 PM
: 1
: The Constant LIFO  ( 1338 )
« : 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!

              


: 1
« previous next »

 

Best RatedList All>>



Latest
Random



SMF 2.0.10 | SMF © 2015, Simple Machines | Contact Webmaster | OnlineFunDb.com © 2009/10 | Legal Disclaimer