Question
The ratio of time taken by P, Q and R to complete work
alone is 4:5:3 respectively. If all three together complete the work in 6 days, then find in how many days P alone will complete three-fourth of the same work?Solution
Ratio of efficiency of P, Q & R = 15 : 12 : 20 So, let total work = (15x + 12x + 20x) × 6 = 282x unit Required days = 282x × 3/4 × 1/15x = 14.1 days
When performing matrix multiplication (C = A \times B) in a code flow, if matrix A is m \times n and matrix B is n \times p, what is the time complexity...
Consider a Java method printList(Node head) for a singly linked list.
class Node {
  int data;
  Node next;
  No...
What is the keyword used in Java to indicate that a class is inheriting from another class?
What is the time complexity for performing enqueue and dequeue operations on a queue implemented using a linked list?
Consider the following Java code snippet:
  import java.util.PriorityQueue;
  import java.util.Comparator;
  class Item...
Which of the following is an example of parametric polymorphism?
Consider the following Java code:
  public class Product {
    private String name;
    private double price;
In R, which function reshapes data from long to wide format?
A Python Queue class uses a list. Its is_empty method is implemented incorrectly.
class Queue:
  def __init__(self):
   �...
Which CPU scheduling algorithm gives preference to processes with shorter CPU burst times?