Minimum number of comparisons required
What is the minimum number of comparisons required to find the second smallest element in a 1000 element array?
Distance between x and z intercept
Determine the distance between x and z intercept of the plane whose eqn is 2x+9y-3z=18
Sqrt of ((d/a)^2+(d/c)^2)
d=18 a=2 b=9 c=-3
(d/a)^2=81 (d/c)^2=36
Sqrt(81+36)=58.5
To print unique numbers eliminating duplicates from given array
Write a Java code to print only unique numbers by eliminating duplicate numbers from the array? (using collection framework)
import javax.swing.JOptionPane;
public static void main(String[] args) {
int[] array = new int[10];
for (int i=0; i
+ "an integer:"));
}
checkDuplicate (array);
}
public static void checkDuplicate(int array []) {
for (int i = 0; i < array.length; i++) {
boolean found = false;
for (int j = 0; j < i; j++)
if (array[i] == array[j]) {
found = true;
break;
}
if (!found)
System.out.println(array[i]);
}
}
From 7:00 am to 11:00 am it rained 2.25 inches. At 11:00 am the rain increased to fall at a rate of 1.25 in. Every two hours. How many inches of rain landed on the ground by 5:00 pm? a)7 b)9.75 c)6 d)3.25 e)7.125
Answer is c)6
11AM - 5PM = 6 hrs
rain increased 1.25 every 2 hrs
3. 3*1.25 = 3.75
total rain = 2.25 + 3.75 = 6
Three beauty pageant finalists-cindy, amy and linda-the winner was musician. The one who was not last or first was a math major. The one who came in third had black hair. Linda had red hair. Amy had no musical abilities. Who was first?
1 2 3 musician MM b.hair | L L ...
First is Linda (answer)she cant 3 bcoz she have red hairmean she (Linda) is 1 n 2.now 1 have musicianbut Amby cant first bcoz he have not such abilities.so 1 n 2 may be Linda or Cindy.or 2 n 3 ma...
Lcm of x and y is 36 and hcf of x and y is 4. If x = 4 then which of the following is definitely not true?
If x = 4 then y = 36?
LCM of 4 and 36 is 36
HCF of 4 and 36 is 4
There are 3 sections with 5 questions each. If three questions are selected from each section, then in how many ways this selection can be done?
If there are 5 questions, and only 3 question are slected, that is 10 different possible combinations. There 3 section, and with each section having 10 possible combinations, give 1000 different possible combinations.
Form 8 digit numbers by using 1,2,3,4,5 with repetition allowed and must be divisible by 4?
There are 78125 8 digit numbers form from the numbers 1, 2, 3, 4, and 5 that are evenly divisionable by 4. I think thats just a few too many than could be listed here.
In a two-dimensional array, x (9, 7), with each element occupying 4 bytes of memory, with the address of the first element x (1, 1) is 3000, find the address of x (8, 5).
Theres no mention of what base 3000 is in, but for the moment Im assuming it is base-8. In which case I believe the answer is 6214 in base-8.
Entry ticket to an exhibition ranges from 1p to 7p. You need to provide exact change at the counter. You have 7p coin. In how many parts will you divide 7p so that you will provide the exact change required and carry as less coins as possible?A) 8 b) 7 c) 5 d) 3
d) 3
Divide the 7p into 1p, 2p, and 4p.
1p = 1p
2p = 2p
3p = 1p + 2p
4p = 4p
5p = 4p + 1p
6p = 4p + 2p
7p = 4p + 2p + 1p
A motor cycle stunts man belonging to a fair, rides over the with vertical walls of a circular well at an average speed of 54 kph for 5 minutes. If the radius of the well is 5 meters then the distance travelled is :a) 2.5 kmsb) 3.5 kmsc) 4.5 kmsd) 5.5 kmse) none of the above
c) 4.5 kms
54 kilometers per hours = 54000 meters per hour
54000 meters / 60 minutes = 900 meters per minute
900 meters * 5 minutes of traveling time = 4500 meters travel
4500 meters = 4.5 kilometers traveled in 5 minutes
(1- 1/6) (1-1/7).... (1- (1/ (n+4))) (1-(1/ (n+5))) = ?
The answer is zero because expression is (1-1/6)(1-1/7)........ 1-1=0 and 1-1/6=0 so (1-1/6)*(1-1/7).....=0
5/n-1
write 1 to 5 numbers on a paper(1,2,3,4,5). Now strike the number 1 and 5. then count the numbers u r having at d middle. there are 3 numbers. In the same way take a cube and eliminate left side corner boxes and right side corner boxes. Then count any 1 line boxes horizontally.
Instead of analyzing the properties of cube its very easy 2 remember the formulas...
we can get answer very fast too.......
thanx
Find the number males and females ?
Present population of town is 35,000 having males and females. If the population of males is increased by 6% and if the population of females is increased by 4%, then after 1 year the population becomes 36,700. Find the number males and females ?
22020 males and 14680 females
Males population after 1 year will be=
36700*6/100*10= 22020
Female population after 1 year will be = 36700*4/100*10 = 14680
So total population after 1 year is 36700
1,6,15,?,15,6,1find the missing number in the series
30
30
What is the distance between that two poles?
There are two poles of equal height 15mts. One cable with length 16mts is hanging between that two poles. The height from center of the cable to earth is 7mts then what is the distance between that two poles?
14mts
Relative distance between pairs of letters
How many such pairs of letters are there in the word wonderful each of which has as many letters between them in the word as in the english alphabet? please give clear guidance to solve this type of questions.
8m
A traveler walks a certain distance
A traveler walks a certain distance. Had he gone half a kilometer an hour faster , he would have walked it in 4/5 of the time, and had he gone half a kilometer an hour slower, he would have walked 2 ½ hr longer. What is the distance?
Ans:15km
solution:
speed(s)*time(t)=distance(d)
walked 1/2km with time 4/5
(s+0.5)((4/5)t)=d --->(1)
1/2km an hour slow, walked 2and half hr long
(s-0.5)(t+2.5)=d ----->(2)
solving (1) & (2)
we get s=2
t=7.5
d=2*7.5=15km
d = 15 kms
x = speed in km/hr
y = time taken
d / x = y - eq1
d / x + .5 = (4/5)*y - eq 2
d / x - .5 = 2.5 + y - eq 3
solving these three equation we get d = 15 x = 2 y = 7.5
in 10 hrs b write= 70-50=20
20 pages-in------10 hrs
therefore1 page in 1/2 hrs
therefore 6pages in 3 hrs
therefore 20+6 in 10+3 hrs
so the ans. is 23 hrs
13
A solid cube is painted black on two of its opposite faces and is cut into 343 pieces. How many small pieces have no paint??
Ok, lets try this one more time to explain why 125 cubes is the wrong answer. We are told that the larger, over all, cube is made up of 343 smaller cubes. With a little knowledge of math its possibl...
The question is; The Given, part of the puzzle: "A solid cube:- 1) is painted black 1a) on two of its opposite faces 2) and is cut into 343 pieces. Question: how many small pieces have no paint??"...
999 comparisons are required to find the second smallest element in an array.