Question
A boat has a speed of 30 km/h in still water. In a
particular stream, the boat's downstream speed is 50% faster than its speed upstream. What is the speed of the stream?Solution
Let the speed of the stream = 'k' km/h Then, upstream and downstream, speed of the boat are (30 - k) km/h and (30 + k) km/h, respectively According to the question, 30 + k = (30 - k) X 1.5 Or, 30 + k = 45 - 1.5k Or, 2.5k = 15 So, k = 6 Therefore, speed of the stream = 6 km/h
Output of below code
public class Prg {
public static void main(String args[]){
System.out.print("A" + "B" + 'A');
}
...The Master Theorem gives time complexity for recurrences of the form:
Which of the following is true for the time complexity of binary search?
Which is not true about minimum spanning tree?
Which sorting algorithm divides the array into halves recursively?
Which command is TCL command
Which of the following is substring of “IXAMBEE”?
Which data structure is used in BFS (Breadth-First Search)?
Which of the following is considered the strongest type of encryption method in modern cyber security practices?
In a binary search tree (BST), what is true about the left child of a node?