Skip to main content

Posts

Showing posts with the label Quiz Question

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 =...

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...

Challenge – Equal Probability between 1 and 7

Question:               Write a method to generate a random number between 1 and 7, given a method that generates a random number between 1 and 5. The distribution between each of the numbers must be uniform. Answer:               Let’s think of this like a decision tree. Each rand5() will be a decision. After 2 tries, we have 25 possible solutions. We try to get maximum bunches of 7 as we can (1 – 21, 3 sets of 7). If we get any of the other values, we just try again. Since the probability of getting each of 21 values are the same every time, trying again won’t affect their probabilities.       int rand7() { while (1) { int num = 5*(rand5()-1) + rand5(); if (num < 22) return ((num % 7) + 1); } } That was fun, right? Anyone up for another challenge? Watch out for it next tuesday (March 1st)...

Challenge – Find First Common Ancestor

Question:                How would you find the first common ancestor of two nodes in a binary search tree? First as in the lowest in the tree. Another way to ask is to find the lowest common ancestor of two nodes.  Meanwhile, check out the challenges from previous weeks here Answer: TreeNode findFirstCommonAncestor(TreeNode root, TreeNode p, TreeNode q) { if (root == null) { return null; } if (root == p || root == q) { return root; } TreeNode left = findFirstCommonAncestor(root.left, p, q); TreeNode right = findFirstCommonAncestor(root.right, p, q); if ((left == p && right == q) || (left == q && right == q)) { return root; } return (left != null) ? left : right; } Alternate: TreeNode findFirstCommonAncestor(TreeNode root, int p, int q) { if (root == null) { return null; } if (root.value == p || root.va...

Challenge – 50 trucks with payload

Question:                Given a fleet of 50 trucks, each with a full fuel tank and a range of 100 miles, how far can you deliver a payload? You can transfer the payload from truck to truck, and you can transfer fuel from truck to truck. Assume all the payload will fit in one truck.  Meanwhile, check out the challenges from previous weeks here Answer :               We want to use as little fuel as possible so we try minimize the number of trucks we use as we go along. Let’s say we start with all 50 trucks with full fuel (5000 miles range). For each mile, we lose 50 miles in range. After two miles, we lose 100 miles leaving us with 4900 miles. This can be supported by 49 trucks so we drop one truck. As you can see for every 100 miles we lose in range, we drop a truck. 50 trucks: 100/50 49 trucks: 100/49 … Total distance = 100/50 + 100/49 + 100/48 + … + 1...

Answer- to Camel and Bananas Challenge

Thanks for all the responses. Quite a few of you have the right answer. The Question was: The owner of a banana plantation has a camel. He wants to transport his 3000 bananas to the market, which is located after the desert. The distance between his banana plantation and the market is about 1000 kilometer. So he decided to take his camel to carry the bananas. The camel can carry at the maximum of 1000 bananas at a time, and it eats one banana for every kilometer it travels. What is the largest number of bananas that can be delivered to the market? And the here is the Answer: At KM#0, we have 3000 bananas. The maximum bananas the camel can carry is 1000 so the camel must at least make 3 trips from the start point. (Leave #0, Return to #0, Leave #0, Return to #0, Leave #0) . If we move just 1km, we need 1 banana for each step mentioned above thus making a total of 5 bananas for each km . We continue making 3 trips until we reach a banana count of 2000. 3000 – 5*d = 2000 ...

Challenge – Camel and Bananas Comment your Answer

Question: The owner of a banana plantation has a camel. He wants to transport his 3000 bananas to the market, which is located after the desert. The distance between his banana plantation and the market is about 1000 kilometer. So he decided to take his camel to carry the bananas. The camel can carry at the maximum of 1000 bananas at a time, and it eats one banana for every kilometer it travels. What is the largest number of bananas that can be delivered to the market? Challenge: Do you know the answer to this question? Post in the comments. The Answer will be posted on 10th Sept   You Can see the Answer for this Challenge Here After Scheduled Date

Puzzle and Interview Questions 2 - 08 sep 2012

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

Puzzle and Interview Questions 1 - 11 Aug 2012

Question: A contractor had employed 100 labourers for a flyover construction task. He did not allow any woman to work without her husband. Also, atleast half the men working came with their wives. He paid five rupees per day to each man, four ruppes to each woman and one rupee to each child. He gave out 200 rupees every evening. How many men, women and children were working with the constructor? Answer: Press Button To See Answer Display Answer

HCL TECHNOLOGIES PAPER - 16 OCT 2005 - CHENNAI

1. How many segment registers are there in the 8086 processor? a) 4 b) 6 c) 8 d) none Ans: a 2. What is the addressing mode of this instruction MOV AL, [BX]; a) direct addressing mode b) register indirect addressing mode ANS: b I am not sure of it. 3. What is the type of file system used in the CD ROM? a) VFAT B) 4) About CPU I think but answer is DMA. 5) If we double the clock speed, then? a) It increases the speed of the processor b) It increases the speed of the system bus c) both of the above D) None 6) Data recovery is done in which layer? a) physical b) datalink c) network d) transport 7) What is thrashing? ANS: swapping in and out the pages frequently from memory. 8) By using 3 nodes how many trees can be formed? ANS:5 9) They give one tree, and ask the post order traversal for that tree? ANS:C 10) Page cannibalation is? ANS:C Aptitude section: 1) They give one scenario and ask questions on that. that is easy. Those are 5 questions. 2) They ask 2 questi...

Wipro - Sample Questions Based on Transations

Three sample questions based on bank related transactions. Question 1 Ritika is a student of a famous Engineering College in Ongole. She wanted to buy a mobile phone but she is not inclined to disturb her father who is a farmer. A local Bank was ready to extend a loan for purchase of mobiles by students on simple interest. She chose a phone that costs 1500. The interest rate on the loan is 12%. If the loan is to be paid back in weekly installments over 2 years, calculate: 1. The amount of interest paid over two years 2. The total amount to be paid back 3. The weekly payment amount (a) 300, 1800, 18 (b) 320, 1820, 22 (c) 350, 1850, 25 (d) 360,1860, 17.88 Answer : d) 360,1860, 17.88 Solution: Principal, P=1500 Number of Years, N= 2 years Rate of interest per annum, R=12% Simple Interest,SI= P X N X R / 100 =1500X2X12 / 100=360. Amount of interest to be paid back in 2 years is 360. Total amount to be paid back P + SI= 1500 + 360=1860. This is to be pai...

Microsoft Placement Question Paper (Algorithm And Programming) Set -1

Algorithms and Programming 1. Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or orientation), how would you cut the remainder of the cake into two equal halves with one straight cut of a knife ? 2. You're given an array containing both positive and negative integers and required to find the sub-array with the largest sum (O(N) a la KBL). Write a routine in C for the above. 3. Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ]. 4. Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all. [ This one had me stuck for quite some time and I first gave a solution that did have floating point computations ]. 5. Given only putchar (no spri...

Quiz Questions Indian National Movement .

1. Quit India Movement was launched in— (A) 1941 (B) 1947 (C) 1942 (D) 1905 Ans : (C) 2. Non-cooperation Movement was withdrawn mainly because of— (A) Friction between the Moderates and Extremists (B) Withdrawal of support by Muslim League (C) Chauri-chaura incident (D) Oppressive attitude of British Government Ans : (C) 3. Who among the following started the Aligarh Movement ? (A) Liaquat Ali Khan (B) Sir Sayyad Ahmed Khan (C) Fazl-i-Hussain (D) Mohammed Ali Jinnah Ans : (B) 4. Apart from the Quit India Movement which started on 9th August, 1942, what other sensational activity of the freedom fighters was done on that day ? (A) Salt Satyagraha (B) Boycott of Simon Commission (C) Champaran Satyagraha (D) Kakori Mail Train ‘Robbery’ Ans : (D) 5. The Ahmedabad Satyagraha of Gandhi was directed against— (A) British mill owners and government officials (B) Indian mill owners and non-government officials (C) British non-government officials (D) Indian...