Question
If '32p47q' is a six-digit number that is divisible by
both 11 and 12, then which of the following can be a possible value of (p + q).Solution
Since, the given number is divisible by 12, it must also be divisible by 3 In order to de divisible by 3, the sum of digits of the number must be divisible by 3 as well. Sum of digits of the given number = 3 + 2 + p + 4 + 7 + q = 16 + p + q If, we check the given options, only (p + q) = 11, makes (16 + p + q) divisible by 3 Therefore, (p + q) = 11
Which algorithm is used for computing Max-Flow in a network?
Given the following code snippet, which operation is performed on the binary tree to produce the output: 4, 2, 5, 1, 3 ?
class Node {Â Â Â Â Â in...Which data structure is most suitable for implementing a priority queue with logarithmic time complexity for insertion and deletion?
Tarjan’s algorithm is used to find:
In C++, which access specifier makes members accessible only from within the class itself and from friend functions/classes?
What is the worst-case time complexity for inserting an element into a hash table that uses separate chaining for collision resolution?
In a graph, what is the maximum number of edges in a simple undirected graph with 'n' vertices?
Time complexity of heap sort is:
Which of the following is true about triggers in a relational database?
What is the primary purpose of an abstract class?