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
A red and blue car were involved in a head-on collision. The red car was at a standstill and the blue car was possibly  speeding. Eye witness video recorded suddenly following the

Using the memory map below; design an absolute decoding circuit.   The technique is to spot the differences between the start and stop of each device. The Ram chip has the follow

System.XML.XLinq.dll has classes to provide functionality to use LINQ with XML.

Probelm: (a) Show the attributes used by Regular Expression Pattern in a WSDL document. (b) Describe the three standard wire formats for transmitting Web Service requests a

Perform the - 48 - 23 operations using the 2's complement method. Ans. - 48 - 23 = - 48 + (-23)     -48     =  1 1 0 1 0 0 0 0     -23     =  1 1 1 0 1 0 0 1       = -71

Appropriate Problems for Decision Tree Learning : However remember there that is a skilled job in "AI" to choose exactly the right learning representation ormethod for a parti

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Q. Explain Time Complexity in Parallel algorithms? As it takes place nearly everyone who implement algorithms wish to know how much of an individual resource (for example time

What is roll area? A roll area having the program's runtime context.  In addition to the runtime stack and other structures, all local variables and any data known to the prog

Which 802 standard provides for a collision free protocol? 802.5 standard gives for a collision free protocol.