c++, 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: 8/31/2012 4:46:09 AM | Location : United States







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

Write discussion on c++
Your posts are moderated
Related Questions
Q. Illustrate Associative Memory? The time required to find an item which is stored in memory can be decreased significantly if stored data can be identified for access by cont

What is reentrant tasks and functions Tasks and functions without optional keyword automatic are static , with all declared items being statically allocated. These items will b

What is C++ reference and JAVA final? Association ends must be bound at initialization and cannot be altered. C++ references can fully enforce these semantics, and the JAVA fin

Channel means logical communication link. There are two parts of channels a) Message channel, b) MQI channel   1) Mesage channel use for communication among QMgr to Q

Explain the importance of Object Oriented Modelling It is important to note that wi t h the growing complexity of systems, significance of modelling techniques increases. Beca

How can I open an MS Access database that has been converted to a current version? Ans) MS Access is not backwards compatible. A workaround to share tables among different versi

Goals - artificial intelligence: One desirable way to make perfect an agent's performance is to enable it to have some details of what it is trying to complete. If it is given

Q. How to export a dreamweaver document as xml file? Step 1: Choose File -> Open, Step 2: Select document which uses a template (and has editable regions) Step 3: Click O

what is parsin? Source programmed statements are observed as tokens, recognizing, building block of language the task of scanning the source statement and classifying the diff

Advntages of parallel processing oversequential computation Parallel computing has the following benefits over sequential computing: i)    Accumulate time ii)   Solves b