What is the time complexity of binary search algorithm?
Answer: C
Binary search has a time complexity of O(log n) because it divides the search space by half in each iteration. This works only on sorted arrays.
Q.225Medium
A train travels from City A to City B at 60 km/h and returns at 40 km/h. If the total journey time is 10 hours, what is the distance between the two cities?
Answer: A
Let distance = d. Time = Distance/Speed. Going: d/60, Returning: d/40. Total: d/60 + d/40 = 10. Taking LCM: (2d + 3d)/120 = 10, so 5d/120 = 10, therefore d = 240 km.
Advertisement
Q.226Medium
In a logical sequence: 2, 6, 12, 20, 30, ?, what is the next number?
Answer: B
The pattern is n(n+1) where n = 1,2,3,4,5,6... First term: 1×2=2, Second: 2×3=6, Third: 3×4=12, Fourth: 4×5=20, Fifth: 5×6=30, Sixth: 6×7=42.
Q.227Medium
Select the word that best completes the analogy: Ephemeral is to Permanent as Verbose is to ____
Answer: B
Ephemeral (short-lived) is opposite to Permanent (long-lasting). Similarly, Verbose (using many words) is opposite to Concise (using few words). The analogy requires antonyms.
Q.228Medium
Two pipes A and B can fill a tank in 12 hours and 18 hours respectively. How long will it take to fill the tank if both pipes are opened together?
Answer: B
Rate of A = 121, Rate of B = 181. Combined rate = 121 + 181 = 365. Time = 536 = 7.2 hours
Q.229Medium
If a number is divided by 7, it leaves a remainder of 4. If the same number is divided by 11, what could be the remainder?
Answer: D
The number could be 11, 18, 25, 32, etc. (of form 7k+4). When divided by 11, remainders vary: 11→0, 18→7, 25→3, 32→10. Cannot determine uniquely.
Q.230Medium
A person covers 60% of a journey by train, 30% by bus, and the remaining distance of 20 km by walk. What is the total distance?
Answer: D
Train + Bus = 60% + 30% = 90%. Walk = 10% = 20 km. Total = 020.10 = 200 km
Q.231Medium
Three numbers are in the ratio 2:3:5. If their sum is 100, what is the largest number?
Answer: C
Let numbers be 2x, 3x, 5x. Sum = 2x + 3x + 5x = 10x = 100. x = 10. Largest = 5x = 50
Q.232Medium
A number when divided by 12 leaves remainder 5. What is the remainder when the number is divided by 4?
Answer: B
Number = 12k + 5. When divided by 4: 12k + 5 = 4(3k) + 4 + 1 = 4(3k+1) + 1. Remainder = 1
Q.233Medium
If 5 workers can build a wall in 12 days, how many days will 10 workers take?
Answer: B
Work is inversely proportional to number of workers. (5 × 12) = (10 × x), so x = 6 days
Q.234Medium
If a person buys 10 items at Rs. 50 each and sells them at Rs. 60 each, what is the profit percentage?