Skip to main content

Posts

Showing posts with the label Aptitude Questions

Aptitude Test Practice Questions - With Answers

Question 1 . Which of the following is least like the others? A.    cube B.    sphere C.    pyramid D.    circle Anwser: D (because the circle is the only two-dimensional figure) Question 2 . Consider a language which uses the following set of characters: Small set: { a b c } Large set: { A B C } Punctuation set: { x y } This language must follow the following rules:   1.    A punctuation character must end all series.   2.    A series can have up to but no more than 4          characters,including punctuation characters. Does the following series follow all the rules of the language defined above? axBy   A.    Yes   B.    No Answer: A (the series has only four characters and ends in a punctuation character) Question 3 . Consider the following flow chart for a customer: The person in No.1 is:     A.   Married, with...

Two sticks and matchbox, measure exactly 45 minutes by burning these sticks

Question: You have two sticks and matchbox. Each stick takes exactly an hour to burn from one end to the other. The sticks are not identical and do not burn at a constant rate. As a result, two equal lengths of the stick would not necessarily burn in the same amount of time.  How would you measure exactly 45 minutes by burning these sticks? Answer: This puzzle used to be asked in Wall Street interviews long time ago. It is very rare for this question to be asked now but it is a very good question to help you think a little outside the normal thought process. The answer is really simple. Since the sticks do not burn at a constant rate, we can not use the length of the stick as any sort of measurement of time. If we light a stick, it takes 60 minutes to burn completely. What if we light the stick from both sides? It will take exactly half the original time, i.e. 30 minutes to burn completely. 0 minutes – Light stick 1 on both sides and stick 2 on one s...

Aptitude Question - what is the proportion of boys to girls in the country?

Question: In a country where everyone wants a boy, each family continues having babies till they have a boy. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same) Answer: This is a very simple probability question in a software interview. This question might be a little old to be ever asked again but it is a good warm up. Assume there are C number of couples so there would be C boys. The number of girls can be calculated by the following method. Number of girls = 0*(Probability of 0 girls) + 1*(Probability of 1 girl) + 2*(Probability of 2 girls) + … Number of girls = 0*(C*1/2) + 1*(C*1/2*1/2) + 2*(C*1/2*1/2*1/2) + … Number of girls = 0 + C/4 + 2*C/8 + 3*C/16 + … Number of girls = C (using mathematical formulas; it becomes apparent if you just sum up the first 4-5 terms) Thus the proportion of boys to girls is 1 : 1 .

Finding the sub-array with the largest sum.

Question: You are given an array with integers (both positive and negative) in any random order. Find the sub-array with the largest sum. Answer: This is an all-time favorite software interview question. The best way to solve this puzzle is to use Kadane’s algorithm which runs in O(n) time. The idea is to keep scanning through the array and calculating the maximum sub-array that ends at every position. The sub-array will either contain a range of numbers if the array has intermixed positive and negative values, or it will contain the least negative value if the array has only negative values. Here’s some code to illustrate.   void maxSumSubArray( int *array, int len, int *start, int *end, int *maxSum ) { int maxSumSoFar = -2147483648; int curSum = 0; int a = b = s = i = 0; for( i = 0; i < len; i++ ) { curSum += array[i]; if ( curSum > maxSumSoFar ) { maxSumSoFar = curSum; a = s; b = i; ...

Reverse a Linked-list. Write code in C.

Question : Reverse a Linked-list. Write code in C. Answer: There are multiple ways to go about this. Let’s first look at a recursive solution.   Node * reverse( Node * ptr , Node * previous) { Node * temp; if(ptr->next == NULL) { ptr->next = previous; return ptr; } else { temp = reverse(ptr->next, ptr); ptr->next = previous; return temp; } } reversedHead = reverse(head, NULL); Now for a non-recursive solution.   Node * reverse( Node * ptr ) { Node * temp; Node * previous = NULL; while(ptr != NULL) { temp = ptr->next; ptr->next = previous; previous = ptr; ptr = temp; } return previous; }   If anyone has any modifications or a better methods, please post it up. Comments are always welcome.

TCS Apptitude test questions and solutions

1. If log 0.317=0.3332 and log 0.318=0.3364 then find log 0.319 ?  Solution: log 0.317=0.3332 and log 0.318=0.3364, then log 0.319=log0.318+(log0.318-log0.317) = 0.3396 2. A box of 150 packets consists of 1kg packets and 2kg packets. Total weight of box is 264kg. How many 2kg packets are there ? Solution: x= 2 kg Packs y= 1 kg packs x + y = 150     .......... Eqn 1 2x + y = 264   .......... Eqn 2 Solve the Simultaneous equation; x = 114 so, y = 36 ANS :  Number of 2 kg Packs = 114. 3. My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at a place with coordinates 36N70W. What is the local time when my plane landed? Options:   a) 6:00 am b) 6:40am c) 7:40 am d) 7:00 am e) 8:00 am Solution: The destination place is 80 degree west to the starting place. Hence the time difference between these two places is 5 hour 20 min. (=24hr*80/360). When the flight landed, the time at the starting place is 12 noon (2 AM + 1...

Cisco Sample Problems On Circles

Question 1 Four concentric circles are drawn with the radii at interval of X units. If the radius of inner circle is X units then the ratio of the area between the 4th and 3rd circles to the area between the 2nd and 1st circles is: a)1:2 b)2:1 c)4:3 d)7:3 Answer : d)7:3 Solution : Let X be the radius of inner(1st) circle. Given that the radii of the circles are at the intervals of X units. Then X + X = 2X, 2X + X = 3X, 3X + X = 4X are the radii of successive circles respectively. Now, the area of first circle = pi(X) 2 = pi x X 2 Area of second circle = pi(2X) 2 = 4 x pi x X 2 Area of third circle = pi(3X) 2 = 9 x pi x X 2 Area of fourth circle = pi(4X) 2 = 16 x pi x X 2 Then, the area between 1st and 2nd circles = (4 x pi x X 2 ) - (pi x X 2 ) = 3piX 2 br /> And the area between 3rd and 4th circles = (16 x pi x X 2 ) - (9 x pi x X 2 ) = 7piX 2 Therefore the required ratio = 7piX 2 / 3piX 2 = 7/3 Hence the answer is 7:3 Question 2 88 and 66 are ...

problems which are based on concentric circles.

Question 1 Four concentric circles are drawn with the radii at interval of X units. If the radius of inner circle is X units then the ratio of the area between the 4th and 3rd circles to the area between the 2nd and 1st circles is: a)1:2 b)2:1 c)4:3 d)7:3 Answer : d)7:3 Solution : Let X be the radius of inner(1st) circle. Given that the radii of the circles are at the intervals of X units. Then X + X = 2X, 2X + X = 3X, 3X + X = 4X are the radii of successive circles respectively. Now, the area of first circle = pi(X) 2 = pi x X 2 Area of second circle = pi(2X) 2 = 4 x pi x X 2 Area of third circle = pi(3X) 2 = 9 x pi x X 2 Area of fourth circle = pi(4X) 2 = 16 x pi x X 2 Then, the area between 1st and 2nd circles = (4 x pi x X 2 ) - (pi x X 2 ) = 3piX 2 br /> And the area between 3rd and 4th circles = (16 x pi x X 2 ) - (9 x pi x X 2 ) = 7piX 2 Therefore the required ratio = 7piX 2 / 3piX 2 = 7/3 Hence the answer is 7:3 Question 2 88 and 66 are t...

Honeywell Practice Problems On Linear Equations

Below are three problems on linear equations. You have to form the equations by using the given information. Question 1 A railway half ticket( for kids below 5 years) costs Rs. 150 and full ticket(for above 5 years) costs Rs. 250. The daily report says that for a particular day, 5000 passengers have travelled and the total collection is Rs.10,50,000. How many kids(below 5 years) have travelled on that day? a)1000 b)2000 c)2500 d)3500 Answer : b)2000 Solution: Let 's' be the number of kids travelled on that day and 'b' be the number of passengers(above 5 years) travelled on that day. Therefore, s + b = 5000 ... eqn (1) Each half ticket's cost is Rs.150 and Each full ticket's cost is Rs.250. Total collection of amount = 150s + 250b = 10,50,000 Or 150s + 250b = 10,50,000 ... eqn (2) Multiplying equation (1) by 150, we get 150s + 150b = 7,50,000 ... eqn (3) Subtracting eqn (3) from eqn (2), we get 100b = 3,00,000 Or b = 3000 We know that s + b =...

TCS Sample Problems On Odd & Even Integers

Below are three questions on numbers on concepts dealing with odd and even and a new class called "even-odd" numbers. Question 1 If n is an even-odd number then which of the following must be false? (A number is called "even-odd" if it is halfway between an even integer and an odd integer.) a) n/2 is not an integer b)(2n) 2 is an integer c)4n is an odd integer d)none of these Answer : c)4n is an odd integer Solution: A number is called "even-odd" if it is halfway between an even integer and an odd integer. For example, consider an even integer 10 and an odd integer -5. Number halfway between them will be (10 - (-5)) / 2 = 7.5. Here 7.5 is an "even-odd" number. i.e., an even-odd number will be in the form x + 1/2 = x.5 where x is any integer. Let us see with each option: Consider option a : Since n is a fraction number then n/2 is also a fraction. i.e., n/2 is not an integer. Hence option a is true. Consider option b :...

Wipro Sample Questions On Roots Of An Equation

Question 1 What is the sum of the irrational roots of the equation (x-1)(x-3)(x-5)(x-7)=9 ? a)10 b)8 c)6 d)4 Answer : b)8 Solution: Given that (x - 1) (x - 3) (x - 5) (x - 7) = 9 Let x - 4 = p Then the given eqn becomes (p + 3) (p + 1) (p - 1) (p - 3) = 9 (p 2 - 1) (p 2 - 9) = 9 p 4 - 10p 2 + 9 = 9 p 2 (p 2 - 10) = 0 p 2 =0 or p 2 -10 =0 p = 0 or p = sqrt(10) or p = - sqrt(10) then x - 4 = 0, x - 4 = sqrt(10) or x - 4 = - sqrt(10) Now the roots of the given eqn are 4,4 + sqrt(10) and 4 - sqrt(10) The irrational roots are 4+sqrt(10) and 4 - sqrt(10) The sum of the irrational roots = 4 + sqrt(10) + 4 - sqrt(10) = 8. Hence the answer is 8. Question 2 The product of the distinct roots of the equation (3x)(3x+2)(3x-4)(3x-6)= 64 is: a)-32/27 b)-61/5 c)63/16 d)69/12 Answer : a)-32/27 Solution: Given that (3x)(3x+2)(3x-4)(3x-6)= 64 Let 3x - 2 = p Then the given eqn becomes (p + 2) (p + 4) (p - 2) (p - 4) = 64 (p 2 - 4) (p 2 - 16...

Infosys Sample Distance Calculation Questions

Question 1 A train starts from station P towards Q with certain speed. Due to a problem, after crossing 50km, the train slows down to 2/3 rd of its actual speed and it reaches Q 50 minutes later than the planned time. Suppose the technical problem had happened after crossing 60 km and the train would had reached 40 minutes late. What is the actual(original) speed of the train and what is the distance between P and Q ? a)30km/hr, 100km b)20km/hr,80km c)40km/hr,150km d)50km/hr,150km Answer : a)30km/hr, 100km Solution: Let the distance between P and Q be X and the speed initially be V. Note that the train travels 50km with speed V and the remaining distance(X-50)km with speed 2/3 of V. According to the above condition, with the formula " distance/speed = time", we can have Time Taken For First 50 Km + Time Taken For Remaining (X-50) Km = Planned Time + Extra Time Due To Problem [50/V]+[(X-50)/(2V/3)] = [X/V]+5/6 (here 50 minutes = 5/6 hours) [100+3X-1...

Accenture Sample Logical Equation Questions

Question 1 If 11 + 21 = 3, 34 + 45 = 32 and 42 + 53 = 23 then 64 + 75 = ? a)59 b)43 c)69 d)53 Answer : a)59 Solution : Let AB be the first number of the addition and CD be the second one. By closely observing, we can conclude that questions are in the general form AB + CD = (A x B) + (C x D). i.e.,11 + 21 = 1 x 1 + 2 x 1 = 1 + 2 = 3 34 + 45 = 3 x 4 + 4 x 5 = 12 + 20 = 32 42 + 53 = 4 x 2 + 5 x 3 = 8 + 15 = 23. Therefore, the result for 64 + 75 = 6 x 4 + 7 x 5 =24 + 35 = 59. Question 2 If 15 + 22 = 32, 19 + 35 = 62 and 23 + 49 = 101 then 34 + 52 = ? a)91 b)101 c)172 d)72 Answer : c)172 Solution: By observing the question we can generalize the equations to, AB + CD = (AB x C) + D Then, 15 + 22 = (15 x 2)+ 2 = 30 + 2 = 32 19 + 35 = (19 x 3)+ 5 = 57 + 5 = 62 23 + 49 = (23 x 4)+ 9 = 92 + 9 = 101 Similarly,34 + 52 = (34 x 5)+ 2 = 170 + 2 = 172 Hence 172 is the required answer. Question 3 If 3 + 5 = 19, 5 + 9 = 61 and 9 + 12 = 117 then 13 + 14 = ? a)1...

Capgemini Sample Dimensions Based Questions

Question 1 A manufacturer reduces the size of his machine of Material1 from 30" to 28" and that of Material2 from 24" to 23". He normally spends Rs.1440 for Material1 and Material2. 3/4th of the amount spent would be for Material1. How much will he save under the size of new size (Assuming that the costs incurred by the machines are directly proportional to their sizes)? a)Rs.85 b)Rs.87 c)Rs.86 d)Rs.88 Answer : b)Rs.87 Solution: The manufacturer totally spends Rs.1440 for both material 1 and 2. Out of this 3/4th is entirely for Material1. Amount spent on Material1 = 1440 x 3/4 = Rs.1080 i.e, he spent Rs.1080 for Material1 of 30" and he reduces 2". Size Amount 30" Rs.1080 2" ? Amount saved on Material1 = 1080 x 2/30 = Rs.72 Amount spent on Material2 = total amount - amount for Material1 = 1440 - 1080 = Rs.360. i.e., he spent Rs.360 for Material2 of 24" and he reduces 1". Size Amount 24" Rs.360 ...

Some Question and answers

1. Using the digits 1,5,2,8 four digit numbers are formed and the sum of all possible such numbers. ans:106656 2. Four persons can cross a bridge in 3,7,13,17 minutes. Only two can cross at a time. find the minimum time taken by the four to cross the bridge. ans:20 3. Find the product of the prime numbers between 1-20 ans.9699690 4. 2,3,6,7--- using these numbers form the possible four digit numbers that are divisible by 4. ans.8 5. Two trains are traveling at 18kmph and are 60 km apart. There is fly in the train. it flies at 80kmph. It flies and hits the second train and then it starts to oscillate between the two trains. At one instance when the two trains collide it dies. Distance traveled by the fly when both trains collide is Ans.---12km 6. there are 1000 doors that are of the open-close type. When a person opens the door he closes it and then opens the other. When the first person goes he opens-closes the doors ion the multiples of 1 i.e., he opens and closes all the doors. when...

Puzzle and Interview Questions 2 - 08 sep 2012

Question:  Count the number of Cubes     Press Button to See the Answer See Answer

Placement Review for Credit Suisse 2012 – pattern | Interviews | Tests

Hey let me declare, that this post is not by me it's a review from a friend who attended the Credit Suisse Campus :)  Description: CREDIT SUISSE Apti: It consisted of 8 puzzles and 8 algoritms/pseudocodes. For puzzles refer to ‘how to ace the brain teaser’. For algorithms refer ‘cracking the coding interview’ and be familiar with questions asked in carrer cup site.There was one DB qstn too. We were asked to design a schema and normalize it. Interview 1: Complete tech. There were 2 bonus questions in the apti to design a client server architecture. I hadn’t solved it in apti so i was asked to explain it. I was asked about my BE project, how i will implement it and explain the algorithms i will be using etc. Thwn he asked me a simple puzzle.that chicken,corn and fox wala. I was asked my fav subject, to which i said database. Then i was asked indexing, structures used, RAID levels. I was asked to design a database schema and write simple queries on it. Then i was aske...

HCL Aptitude Test Paper 25 quesstions Answers at the end

Directions (Q. 1-5): In each of the following number series one of the given numbers is wrong. Find out the wrong number. 1. 8 34 207 1661 16617 199417 1) 8      2) 34     3) 207    4) 1661     5) None of these 2. 7 75 395 2379 11879 47541 1) 7      2) 75    3) 395     4) 2379      5) None of these 3. 420 70 75 300 197 148.5 1) 70     2) 75    3) 300    4) 197        5) None of these 4. 9 21 51 155 540 2163 1) 9       2) 21    3) 51      4) 2163      5) None of these 5. 22 37 59 97 155 251 1) 37     2) 59    3) 97      4) 155        5) None of these 6. A...

IBM Aptitude Test Paper

1. Speed of boat in still water is 10kmph..if it travels 24km downstream,16km upstream in the same amount of time,what is the speed of the stream? (a)3kmph (b)3.5kmph (c)2kmph (d)... 2. A cube of 3 units is painted on all sides. If this cube is divided into cubes of 1 unit,how many cube have none of their faces painted? (a)... (b)2 (c)1 (d)0 (e)none of these 3. If a person sells a product for rs141/- he suffers a loss of 6%.if he has to have a profit of 10%, at what price should he sell it? (a) (b)rs.175 (c).. (d)rs.165 ans. rs.165 (i think,check) 4. A ball falls from a height of 8ft ,bounces back to half the distance & continues till it comes to rest. what is the total distance travelled by the ball? (a)24ft (b)... (c)infinite (d)cannot be determined ans:(a) 5. Which of the following is the sum of 3 consecutive prime nos? (a)49 (b)59 (c)both a &b (d).... ans:c 6. If the area of a square has increased by 69%,by what % has its side increased? 7. In a class the average age is 16...

Microsoft Placement Papers for B.Tech,.B.E.,MCA,M.Tech,ME and aptitude tests

Microsoft Placement Paper  Questions 1.C++ ( what is virtual function ? what happens if an error occurs in constructor or destructor. Discussion on error handling, templates, unique features of C++. What is different in C++, ( compare with unix). 2. Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list). 3. Given 3 lines of assembly code : find it is doing. IT was to find absolute value. 4. If you are on a boat and you throw out a suitcase, Will the level of water increase. 5. Print an integer using only putchar. Try doing it without using extra storage. 6. Write C code for (a) deleting an element from a linked list (b) traversing a linked list 7. Compute the number of ones in an unsigned integer. ANS. #define count_ones(x) \ (x=(0xaaaaaaaa&x)>>1+(0x55555555&x), \ x=(0xcccccccc&x)>>2+(0x33333333&x), \ x=(0x...