Question
A company hires workers A, B, and C to finish a project.
A can complete the project in 30 days, B can do it in 24 days, and C can complete it in 20 days. They start working together, but after 5 days, A leaves. How many more days will B and C together take to finish the remaining work?Solution
Work done by A, B, and C in 1 day = 1/30 + 1/24 + 1/20 = 4/120 + 5/120 + 6/120 = 15/120 = 1/8 of the project per day. Work completed by all in 5 days = 5 × 1/8 = 5/8 of the project. Remaining work = 1 - 5/8 = 3/8 of the project. Work done by B and C together in 1 day = 1/24 + 1/20 = 5/120 + 6/120 = 11/120 of the project per day. Time taken by B and C to finish the remaining 3/8 work = (3/8) ÷ (11/120) = 3/8 × 120/11 = 45/11 = 4.09 days.= 4 days(approx)
Consider the following C code snippet:
  #include
  void printPattern(int n) {
    if (n <= 0) {
�...
Which of the following is a common challenge in transitioning from a monolithic to a microservices architecture?Â
In Python, if a method in a subclass has the same name as a method in its superclass, which method will be called when invoked on an object of the subcl...
The following Java code attempts to demonstrate multiple inheritance, which is not directly supported for classes in Java. How can similar functionality...
The following C++ code has a common inheritance-related issue. How can it be debugged to ensure the derived class constructor properly initializes the b...
A recursive backtracking solution for the Subset Sum problem is generating duplicate subsets or missing valid subsets. Assuming the input array might co...
In a Breadth-First Search (BFS) algorithm for graph traversal, what is the primary role of a queue?
Which of the following is a characteristic of "tight coupling" between software modules?
In a perfectly balanced Binary Search Tree with N nodes, what is the worst-case time complexity for searching for an element?
What is a characteristic feature of a bipartite graph?