Question
P started a business with an investment of Rs.10000,
after 6 months Q joined him with Rs.12000 and after another 6 months R joined them with Rs.15000. If after end of two years profit share of Q is Rs.9000, then what is the total profit earned by them?Solution
Profit is shared based on investment × time. P: 10000 × 24 = 240000 Q: 12000 × 18 = 216000 R: 15000 × 12 = 180000 So profit ratio = 20:18:15 Total parts = 53 Q's 18 parts = Rs. 9000 → 1 part = Rs. 500 Total profit = 53 × 500 = Rs. 26,500
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?