Question
Ratio of distance covered by boat in upstream to
downstream is 4:3. Time taken in downstream and upstream is 2hr and 4 hr respectively. If speed of boat in still water is 15 km/hr then find speed of stream.Solution
Let distance covered by boat in upstream and downstream be 4x and 3x km respectively. And speed of stream be y km/hr. ATQ, => 4x/(15 – y) = 4 => 4x + 4y = 60 ------ (i) => 3x/(15 + y) = 2 => 3x – 2y = 30 ------ (ii) Solving (i) and (ii), we get => x = 12, y = 3 km/hr Speed of stream = 3km/hr
Complete a simple hash function for a string s that sums the ASCII values of its characters and then takes the modulo of a prime number M.
def si...
A Java method attempts to extract a substring.
public class StringProcessor {
  public String extractPart(String text, int start, int ...
The latency of a network isÂ
There is a BST and below is the Pre order of the BST, What will be it’s In order
150 70 60 80 250 200 350
What does Cyclomatic Complexity measure in software engineering?
The Process Control Block (PCB) does not typically contain which of the following information?
A software developer is designing a banking application where each bank account object should restrict direct access to its balance variable to prevent ...
The following Python code intends to enforce that all `Worker` subclasses implement a `work` method. However, it's not working as expected.
class...
The Maximum Power transfer theorem states that maximum power is delivered when_______
What is the purpose of the CASE statement in SQL?