A warehouse manager needs to pack boxes into containers. If 15 workers can pack 450 boxes in 6 hours, how many boxes can 20 workers pack in 8 hours, assuming the same productivity rate?
A800 boxes
B900 boxes
C1000 boxes
D1200 boxes
Correct Answer:
A. 800 boxes
EXPLANATION
Rate per worker per hour = 450/(15×6) = 5 boxes/hour. For 20 workers in 8 hours = 20×8×5 = 800 boxes.
A software developer needs to optimize a SQL query. Currently, the query performs a full table scan on a table with 1 million rows. Which of the following would be the BEST approach to improve performance?
AAdd an INDEX on the columns used in WHERE clause
BIncrease the RAM of the database server
CReduce the number of columns in SELECT statement
DArchive older records to a different table
Correct Answer:
A. Add an INDEX on the columns used in WHERE clause
EXPLANATION
Adding an INDEX on columns used in WHERE clause is the most direct and effective way to optimize query performance by avoiding full table scans. This is a standard database optimization technique. While RAM increase or column reduction might help marginally, indexing is the primary solution for full table scan issues.
A train travels from City A to City B at 60 km/h. On the return journey, it travels at 40 km/h. If the total time taken for both journeys is 10 hours, what is the distance between the two cities?
A240 km
B300 km
C360 km
D420 km
Correct Answer:
A. 240 km
EXPLANATION
Let distance = d. Time = Distance/Speed. d/60 + d/40 = 10. LCM(60,40) = 120. (2d + 3d)/120 = 10. 5d = 1200. d = 240 km.