Question
A tank can be filled by pipe A in 6 hours and by pipe B
in 8 hours. A third pipe C can empty the tank in 12 hours. If all three pipes are opened together, in how many hours will the tank be filled?Solution
A’s rate = 1/6 tank/hour B’s rate = 1/8 tank/hour C’s (waste) rate = −1/12 tank/hour Net rate = 1/6 + 1/8 − 1/12 LCM(6, 8, 12) = 24 1/6 = 4/24, 1/8 = 3/24, 1/12 = 2/24 Net = (4 + 3 − 2)/24 = 5/24 tank/hour Time = 1 ÷ (5/24) = 24/5 hours Answer: 24/5 hours.
Which attack can be mitigated using DNSSEC (Domain Name System Security Extensions)?
In Python, what will be the output of the following code snippet, considering scope rules?
x = 5Â Â Â Â Â Â Â Â Â Â Â Â Â Â
Â
What is the primary purpose of a B+ Tree in a database management system?
What is the primary purpose of an abstract class?
If a stack is implemented using a fixed-size array, what is a significant disadvantage when the stack grows beyond its initial capacity?
What is "rubber duck debugging"?
Consider the following Python code for calculating the length of the LCS:
def lcs_length(text1, text2):
  m = len(text1)
  ...
Time complexity of heap sort is:
A code flow involves processing a stream of data where elements are added to the front and removed from the front. Which type of linked list would provi...
Which of the following best describes Abstraction in Object-Oriented Programming (OOP)?