I NEED TO GET THIS DONE BY 2 PM.......I REALLY NEED U GUYS HELP...........
ANY1 OUT THERE?! MAY BE THIS IS QUITE SIMPLE FOR U TECHIES OUT THERE.........
1) Merge two arrays of integers in sorted order, and then print a number from the new array
with following condition : Probability of number occurring in result is
higher if number is towards the end of the array. For example if relative probability of
1st number appearing is 0.1, for second number it would be .2 for third number
0.3 and so on
HINT: Array merge is simple merge as in items of first array followed by
items of second array.Now you have to print one number from this merged array. Probability
comes in deciding which number to print. A number coming towards the end
in merged array should have higher probability of getting
2) In a college there are various departments and subdepartments and
there are some printers. There is a hierarchy for use of printers. For
example sub departments can use main department's printer. Printers are of
3 kind 1. colored laser 2. black and while laser 3. dot-matrix . Anyone
who has access to colored laser has access to other two, similarly anyone
who has access to white laser has access to dot-matrix. Write a program
which depicts this structure.
HINT: Printer - for example physics department may have 3 printer for all
where as its subdepartment for Nuclear physics could have 2 printers,
which can't be used by some other sub department. BTW, this question is
less about logic and more about gauging much of OOD/OOP .
|All times are GMT +5.5. The time now is 09:55.|