- Q An IITian student, having forgotten to attend his last Physics lab, has to now cook up a graph for the lab report. He has a moth-eaten journal from ten years ago of the same lab, in which the readings are there, but not in the same order that they were taken down from the experiments. Each reading has an x-value which runs from 1 from to the number of readings, and a y-value, which may be any positive integer. However, only the latter is visible for each reading, in the old report. The student knows that the final graph is a sine wave. With a couple of hours left for submission, he decides that the closest he can get to that is to plot a ``zigzag graph''. He will rearrange the readings in such a way that when a line is drawn between successive readings on the graph, a zigzag pattern is obtained, with every point being at a local maxima or minima of the graph. There may be more than one reading with the same y-value, but if they are placed adjacent, the lab instructor will spot the student's ploy immediately and have him repeat the experiment. Hence, he wants to avoid an arrangement in which this happens. Write a program that given a sequence of readings, determines whether they suit the student's requirements or not. The input consists of n+1 lines, with a single integer on each, when there are n readings. The first number is the number of readings, i.e. n, and the remaining numbers are the y-values of the readings, given in no particular order. The output should be the word ``no'' in lowercase letters, if the readings can't help the hapless student, or the required sequence, if they can. In the latter case, the readings, in the correct order, should be output as a single integer on each line. Hence, for an n-reading problem, for which a ``good'' rearrangement exists, the answer will consist of n lines. There will be at most 500 readings, with y-values in [0,10]. ...
- Q What is the difference between main test and compile module
- Q Did the Holy Prophet pay Mahr for his first wife, Hazrat Khadija? How much?
- Q What are the perquisites to configure server?
- Q Write Notes on SMD
- Q How many natural numbers are there between 17 and 84 which are exactly divisible by 6?
- Q IT governance ensures that an organization aligns its IT strategy with: A. Enterprise objectives. B. IT objectives. C. Audit objectives. D. Finance objectives.
- Q How do you plan your day?
- Q How far the use of diethylamine can be allowed or possible in purification of alkaloids by chromatography methods? Does diethylamine at any point of time react with alkaloids during purification steps?
- Q A jsp page, include.jsp, has a instance variable "int a", now this page is statically included in another jsp page, index.jsp, which has a instance variable "int a" declared. What happens when the index.jsp page is requested by the client?
- Q REUSABLE VS NON REUSABLE & PROPERTIES OF SEQUENCE GENERATOR TRANSFORMATION