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
Performance and Issues in Pipelining Speedup:   Firstly, we get the speedup factor that is we see how much speed up performance we get through pipelining. First we get the

As demonstrated in a simple manner in my Animated Tiles example, the purpose of this assignment is to use jQuery animations to develop a simple puzzle using DIV tags and styles. C

Define DMA. The transfer of data among a fast storage device such as magnetic disk and memory if often limited by the speed of the CPU. Removing the CPU from the path and letti

For the purposes of this assignment, you are the accountant for an industrial property development company, Devprop Leasing Co., that typically develops warehouse and industrial co

First, remember that different processes keep their own data in distinct address spaces. Threads, on the other hand, explicitly share their entire address space with one another. A

What is an operating system?  An operating system is a program that handles the computer hardware. It acts as an intermediate among users of a computer and the computer hardwar

Q. Explain about Hamming error correcting code? Richard Hamming at Bell Laboratories worked out this code. We will only introduce this code with help of an illustration for 4 b

Forward Chaining - Artificial intelligence: Imagine we have a set of axioms which we know are true statements regarding the world. If we set these to each be a starting state o

An assembly line consists of 3 fail safe sensors and one emergency shutdown switch. The line must keep moving unless any of the given conditions occur: a. When the emergency swi

Bring out the importance of hierarchy of operators?  The operators  within  C are grouped  hierarchically according to their precedence(i.e., order of evaluation). Operations w