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 tobuy a particular stock at its loerest price andsell it later at its highest price,since the stock market is unpredictable,yousteal the price plans of a company for this stockfor 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 changein 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
given: x=60 and s=6 find the z-score that corresponds to each of the following scores up to two decimal places
a. x=70
b. x=58
Write an equation to describe the variation. Use k for the constant of proportionality.
g varies inversely as p
Write an equation to describe the variation. Use k for the constant of proportionality.
r varies directly as f
The intensity of light (in foot-candles) varies inversely as the square of x, the distance in feet from the light source. The intensity of light 2 feet from the source is 80 foot-candles. How far away is the source if the intensity of light is 5 foot-candles?
For the statement, find the constant of variation and the variation equation.
y varies jointly as x and the cube of z; y=16 when x=4 and z=1
Write the statement as an equation. Use k as the constant of variation.
r varies jointly as s and the cube of n
Write the statement as an equation. Use k as the constant of variation.
w varies jointly as c and f
If the voltage V in an electric circuit is held constant, the current I is inversely proportional to the resistance R. If the current is 50 amperes when the resistance is 240 ohms, find the current when the resistance is 150