Question
When the average of any two numbers is added to the
remaining number, the results come out to be 260, 248 and 232 respectively. What is the difference between the largest and smallest number?Solution
ATQ,
Let the numbers be x, y, z. 2x + y + z = 260 Γ 2 = 520 x + 2y + z = 248 Γ 2 = 496 x + y + 2z = 232 Γ 2 = 464 4(x + y + z) = 520 + 496 + 464 = 1480 x + y + z = 370 x = 520 β 370 = 150 y = 496 β 370 = 126 z = 464 β 370 = 94 Difference = 150 β 94 = 56
What is the primary objective of the Producer-Consumer problem in concurrent programming?
Using a bottom-up dynamic programming approach to calculate the 6th Fibonacci number (F(0)=0, F(1)=1), what are the values stored in the DP table F at i...
Which access specifier allows data to be accessed only within the class?
Which is computer object code?
Which model uses probability of word occurrence based on previous n-1 words?
In a perfectly balanced Binary Search Tree with N nodes, what is the worst-case time complexity for searching for an element?
Python's built-in dict (dictionary) data structure is typically implemented using a hash table. What is the average-case time complexity for get, set, a...
Which of the following language is used for specifying style sheets for XML documents?Β
In C++, what mechanism is primarily used to achieve runtime polymorphism?
Which of the following uses Latent Dirichlet Allocation (LDA)?