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. Find 9's complement for decimal number? The 9's complement is achieved by subtracting every digit of number from 9 (the highest digit value). Let's assume that we want to si

Assignment 3.b: Experiment with Neural Network Background: In this assignment, you will experiment with neural network for solving different types of practical problems. Y

Optical disk becomes an attractive alternative for backing up information from hard disk drives and employs large text, audio and video data. Advent of CD-ROM-R and DVD-ROM-R has b

CPU burst time indicates the time, the process needs the CPU. The following are the set of processes with their respective CPU burst time     (in milliseconds). Process

1. Detail for each of the four following MIPS instructions, which actions are being taken at each of their five steps. Do not forget to mention how and during which steps each inst

Define dynamic loading. To get better memory-space utilization dynamic loading is used. With dynamic loading, a routine is not loaded unless it is called. All routines are kept

Back propagation Learning Routine - Aartificial intelligence As with perceptrons, the information in the network is stored in the weights, so the learning problem comes down to

Not Recently Used Page Replacement Algorithm The not recently used abbreviated as NRU page replacement algorithm works on the subsequent principle: while a page is referenced,

Advantages of MPI: Every process has its own local variables It can be used on a broader range of problems than OpenMP It runs on either distributed or shared memor

State the Use parameters and parameter definition modules. Parameters aren't preprocessor definitions and they have scope (for example parameters are associated with specific