The principal of a school wants to speak with some of the students to assess their over all development including studies,most of the teachers were selecting the toppers of their classes but Mr,sam thought of an idea to select the bunch of students who did not have much difference in their marks so that he gains the reputation of a teacher who teaches well to the whole class and not just to a bunch of brilliant students.
Your are required to help mr,sam in selecting K students that can speak with principle from his class .you need to return an integer array representing the marks of the selected students sorted in ascending order.
I/p1:An integer value denoting the number of students in Mr.sam’s class.
I/p2:An integer array of size input1representing the marks of each student
I/p3:An integer K denoting the number of representatives to be
O/p:return an integer array containing the marks of K selected students sorted in ascending order.
Ex:
I/p1:10
I/p2:{950,477,55,602,881,302,859,438,551,382}
I/p3:1
O/pt:{950}
Harrypotter is visiting his uncle’s house ,the house of Black ,and ants to know more about the family through their ancestral tree.He notices that the ancestraltreebegins with the head of the family at the top,having 2 children as his descendants,This pattern is followed throught and each member is represented by unique integer.
Given relationships in the form ofan integer arraywhere the head of the family is at the first position (i=0) and his children areat position (2*i+1) and (2*i+2).
Your task is to help harry find and return all the siblings of any given family member and return them in the form of a sorted array.
Note:if there are no siblings ,return {-1}.
Example:
Input1:5
Input2:{1,2,3,4,5}
Input3:1
Output:{-1}
you want to buy a particular stock at its lowest price and sell it later at its highest price,since the stock market is unpredictable,you steal the price plans of a company for this stock for the next N days.
Find the best price you can get to buy this stock to achieve maximum profit.
Note:The initial price of the stock is 0.
Input1:Nnumber of days.
Input2:Array representing changing stock price for the day.
Output: Your function must return the best price to buy the stock at.
Example:
Input1:5
Input2:{-39957,-17136,35466,21820,-26711}
Output:-57093
Calculate the surface area Integral of object obtained by rotating the function x=2y+5 for x=-1 and -2 about y axis
A reaction has a rate constant of 7.3x10 M/s at 315 K and a frequency factor of 4.4x10 What is the activation energy of the reaction?
combustion of methane with air . the volumetric analysis of the products oon a dry basis revela sthe following
If 45 m3 of combustion products at 1000 K of the following
composition: 6.2 % O2, 1.0% H2O, 12.3 % CO2, and the balance N2 are cooled at atmospheric pressure from 1000 K to 250 K, what is
the enthalpy change in the J?
Calculate the enthalpy change that occurs when 5 lb of CO2 change
state from 8 psia and a mixture containing 20 % liquid plus solid to
200 oF by a constant volume process.
Consider how the economy has performed throughout your life. Identify a time you believed the economy was in a peak or a trough. When was the economy expanding? When was it contracting? Describe the overall trajectory of the economy throughout your life.
1. Give two factors that may affect a good gram staining technique output. Provide an explanation of how these factors influence the result.