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
Memory-to-Memory Architecture The pipelines can access vector operands intermediate and final results straight in main memory. This necessitates the higher memory bandwidth. Fu

Navigation to a subsequent screen can be specified statically/dynamically Yes, navigation to a subsequent screen can be specified statically.

How can I read .doc document in ASP.Net? You can read from a text file like this.   Private void Button12_Click(object sender, System.EventArgs e) { string path="C:

Phase - Thermodynamics: A phase is quantity of matter that is homogeneous throughout in chemical composition and physical structure. If the matter is all gas, all liquid or

What are wired and wireless transmission systems? Transmission Systems: Modern type long distance transmission systems can be placed in three wide categories: 1. Radio Sy

What is the difference among using a filter and a query to find records? Filter is used to quickly limit the records as we are already viewing in a Datasheet or a form to those

What is meant by stacked list? A stacked list is nothing but secondary list and is showed on a full-size screen unless you have specified its coordinates using the window comm

As an advocate of CISC architecture to RISC architecture, what are the merits and demerits of CISC to RISC architecture

Q. Characteristics of Magnetic disk? Tracks and Sectors: Disk is divided in concentric rings known as tracks. Thus a track is one complete rotation of disk underneath read/wr

Elements are given 3,14,7,1,8,5,11,17,,6,23,12,20,26,4,16,18,24,25,19 We will construct b tree and avl tree And after that delete some integers