Question
Two trains of same length are running in parallel tracks
in the same direction with speed 26 km/hr and 80 km/hr respectively. The latter completely crosses the former in 20 seconds. Find the length of each train (in m).Solution
When two trains cross each other, they cover distance equal to the sum of their lengths with relative speed.  Let's take length of each train = x So, total length of both trains = 2x Relative speed = (80 – 26) × (5/18) = 15 m/sec. ∴  Total length = Time × Relative speed  ⇒  2x = (20 × 15) ⇒  x = 150 m
In a data analysis workflow, an index is created on a column with very low cardinality (e.g., a 'gender' column). What is a potential consequence of this?
Binary trees are often used to represent hierarchical data. Which of the following is NOT a direct application of binary trees?
What does it mean for an algorithm to be "in-place"?
What is the primary goal of the Matrix Chain Multiplication problem in dynamic programming?
Consider the following Java code:
public class LengthMix {
  public static void main(String[] args) {
    int[] numbers...
A function sum_matrix_elements(matrix, R, C) is designed to sum all elements of a matrix with R rows and C columns. The implementation uses nested loops...
Which is best fit for blank space 14?
Which of the following statements accurately describes Third Normal Form (3NF) in database normalization?
In a multi-homed network, BGP route flapping causes external instability. Which mechanism MOST effectively prevents repeated advertisement of unstable r...
What is the time complexity of the KMP algorithm for searching a pattern of length 'M' in a text of length 'N'?