The specific gravity of a liquid is 0.79 kg/m^3. Calculate
the mass density and the specific weight of the liquid.
One of the streets in your city has a total of L street lights. Each light i covers the street from
Xi to Yi distance. Find the length of street covered with light.
Input Specification:
input1: L, denoting the number of street lights.
input2: An array of L* 2 elements. For each row i, (Xi, Yi) denote that the
street light i covers the distance from Xi to Yi.
Output Specification:
Your function should return the length of the street covered with light.
Example 1:
input1: 1,
input2: {{5,10 } }
Output: 5
N number of people participated in a coding marathon where they were asked to solve some problems. Each problem carried 1 mark and at the end of the marathon,
the total marks that each person achieved was calculated.
As an organizer, you have the list of the total marks that each person achieved. You have to calculate the sum of the marks of top K scorers from the list.
Input Specification:
input1: N, Total number of participants
input2: K, Top scorers
input3: An array of length N with the scores of all N participants
Output Specification:
Return S, sum of the marks of top K scorers from the list.
Example 1:
input1: 4
input2: 2
input3: {4, 1, 2, 5}
Output: 9
Explanation: Top 2 scores are 5 and 4. Sum = 5+4=9.
Example 2:
input1: 4
input2: 3
input3: {4, 3, 6, 1}
Output: 13
Explanation: Top 3 scores are 6, 4 and 3. Sum = 6+4+3=13.
All 77 rooms in a motel will be rented each night if the manager charges $40 or less per room. If he charges $(40+z) per room, then 2z rooms will remain vacant. If each rented room costs the manager $7 per day and each unrented room $2 per day in overhead, how much should the manager charge per room to maximise his profit?
N number of people participated in a coding marathon where they were asked to solve some problems. Each problem carried 1 mark and at the end of the marathon,
the total marks that each person achieved was calculated.
As an organizer, you have the list of the total marks that each person achieved. You have to calculate the sum of the marks of top K scorers from the list.
Input Specification:
input1: N, Total number of participants
input2: Top scorers
input3: An array of length N with the scores of all N participants
Output Specification:
Return S, sum of the marks of top K scorers from the list.
Example 1:
input1: 4
input2: 2
input3: {4, 1, 2, 5}
Output: 9
Explanation: Top 2 scores are 5 and 4. Sum = 5+4=9.
Example 2:
input1: 4
input2: 3
input3: {4, 3, 6, 1}
Output: 13
Explanation: Top 3 scores are 6, 4 and 3. Sum = 6+4+3=13.
A special unit is formed within the police force of N policeman,such that no 2 policeman have equal ranking. The rank of a policeman is depicted by the number of
stars in his badge. There are a total of N policeman each having a badge containing some stars.
your task is to calculate the minimum number of extra starsthat need to be bought in order to meet the above constraint.
Note: A star cannot be removed from a badge.
Input Specification:
input1: N denoting the number of policeman in the special unit.
input2: An array of N elements[A1,A2,..AN] where Ai denotes the number of stars on the badge Ai.
Output Specification:
Your function should return the minimum number of extra stars required.
The joint PDF of the random variables f(x,y)=8xy,0<x<1, 0<y<x
f(x,y)=8xy,0<x<1, 0<y<x. Find the marginal probability density function of Y.
1. Explain why an investor would want to invest in financial assets as opposed to investing in real assets
1. Explain the benefits of investing in financial assets?
Use the localized electron model to describe the bonding in hydrogen cyanide and
Phosgene (COCl2).