Question
Three individuals – Ria, Tia, and Mia – are
discussing their ages. The age of Ria 8 years ago was one-third of Tia’s age 4 years from now. The total of their present ages is 60 years. If Mia is 5 years younger than Tia, then what is the current age of Mia?Solution
ATQ,
Let the present ages of Ria and Tia be ‘x’ years and ‘y’ years respectively. According to question, 3(x – 8) = (y + 4) 3x – 24 = y + 4 3x – y = 28 -------- (1) Also, (x + y) = 60 -------- (2) Solving (1) and (2), we get x = 16 and y = 44 So, the age of Mia = 44 – 5 = 39 years
The time complexity of computing the all-pairs shortest paths in a dense graph with V vertices using Floyd–Warshall is:
The time complexity of the best case for QuickSort is:
In Data Structures, which of the following algorithms uses the Divide and Conquer strategy?
In a Min-Heap, the root node is:
Which of the following statements about Dijkstra’s algorithm is true?
Which data structure is most suitable for implementing recursion?
In mobile computing, what is the main feature of pervasive computing?
Output of below code
public class Prg {
public static void main(String args[]){
System.out.print("A" + "B" + 'A');
}
...Which file structure is best suited for handling large datasets and ensuring fast access in C, C++, Java, or Python?    Â
Which of the following algorithms uses a greedy approach?