Question
A can complete a piece of work in 12 days and B can
complete it in 18 days. They work together for 4 days and then B leaves. In how many more days will A finish the remaining work?Solution
ATQ, A’s 1‑day work = 1/12 B’s 1‑day work = 1/18 Together in 1 day: = 1/12 + 1/18 LCM(12,18) = 36 = 3/36 + 2/36 = 5/36 Work done in 4 days = 4 × 5/36 = 20/36 = 5/9 Remaining work = 1 − 5/9 = 4/9 Now only A works: Time = (remaining work) ÷ (A’s 1‑day work) = (4/9) ÷ (1/12) = (4/9) × 12 = 48/9 = 16/3 days Answer: A will take 16/3 days more.
State True or False
Kernel level thread cannot share the code segment.
Which of the following protocol is a network layer protocol and used for reporting errors?
What is the time complexity of a Binary Search algorithm on a sorted array of 'n' elements?
What is the primary purpose of Named Entity Recognition (NER)?
Consider the in-order traversal of a Binary Search Tree. What characteristic does the sequence of visited nodes possess?
In a 0/1 Knapsack problem implemented using dynamic programming, a common mistake is to allow items to be reused, effectively turning it into an unbound...
In a backtracking algorithm, what happens when a partial solution is found to violate a constraint?
Consider the following Python code:
text = "banana"
char_to_find = 'a'
count = 0
for i in range(len(text)):
  if ...
What is a common disadvantage of greedy algorithms?
What is the primary purpose of the UNION ALL operator in SQL?