c programming, Computer Engineering

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with these names could be kept in that shelf as in this example: bottom of shelf ---> [AAAJKRDFDEWAAYFYYKK]-----Top of shelf. All these packets are to be loaded on cars. The cars are lined in order, so that the packet could be loaded on them. The cars are also named [A, B, C, D, E,………….]. Each Car will load the packet with the same alphabet. So, for example, car ‘A’ will load all the packets with name ‘A’. Each particular car will come at the loading point only once. The cars will come at the loading point in alphabetical order. So, car ‘B’ will come and take all the packets with name ‘B’ from the shelf, then car ‘C’ will come. No matter how deep in the shelf any packet ‘B’ is, all of the ‘B’ packets will be displaced before the ‘C’ car arrives. For that purpose, some additional shelves are provided. The packets which are after the packet B, are kept in those shelves. Any one of these shelves contains only packets, having the same name. For example, if any particular shelf is used and if a packet with name X is in it, then only the packets having names X will be kept in it. That shelf will look like [XXXXXXX]. If any shelf is used once, then it could be used again only if it is vacant. Packets from the initial shelf could be unloaded from top only. Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.
Posted Date: 9/3/2012 1:39:41 AM | Location : United States







Related Discussions:- c programming, Assignment Help, Ask Question on c programming, Get Answer, Expert's Help, c programming Discussions

Write discussion on c programming
Your posts are moderated
Related Questions
What are difference between Mealy and Moore state machine? Difference between Mealy and Moore state machine: 1) Mealy and Moore models are the fundamental models of state ma

Commutativity of Connectives : In this you will be aware of the fact that some arithmetic operators that have a property which it doesn't matter that way around you give the o

Sixth Generation (1990 - ) This  generation  begun  with  many  gains  in  parallel  computing,  both  in  hardware area and in improved understanding of how to build up algori

Interfacing Subroutines with Parameter Passing Let's now write a C program which calls the assembly program for parameter passing. Let's extend the previous two programs such t

Describe the VON NEUMANN ARCHITECTURE Most  of  present  computer  designs  are  based  on  idea  developed  by  John  vonNeumann referred to as the VON NEUMANN ARCHITECTURE. V

What is the use of status command, data output command, and data input command. A status command is used to test a variety of status conditions in the interface and the periphe

Set Value is ready to ActiveX Object from the form. Let Value is retried to ActiveX Object from the form. Get- Assigns the value of an expression to a variable or property.

When an input signal A=11001 is applied to a NOT gate serially, its output signal is ? Ans. First input applied will be LSB 00110, as A=11001 is serially applied to a NOT gate

Explain the term recursion A recursive function is one which calls itself. Recursive functions are useful in evaluating certain types of mathematical function. Here is a recursiv

Post interrupts - computer architecture: Post interrupts Exact interrupts examine interrupt bit on entering WB Longer latency Handle immediately