Question
__ and __ live on same
floor. Answer the questions based on the information given below: Ten persons (A, B, C, D, E, F, G, H, I and J) live on 10 different flats of a 5 storey building, where the bottommost floor is 1 and the floor above is 2 and so on. There are 2 types of flats on each floor, flat A and flat B such that flat A is in the west of flat B. Flat A of floor 1 is immediately below of flat A of floor 2, which is immediately below of flat A of floor 3 and so on, similarly for flat B. The dimensions of each of the flats is same There are two floors between the floors of J and G (both of them may or may not live in the same type of flat). J lives on first floor. J lives south west of B. F lives 2 floors above B (both live in the same type of flat). D lives immediately above floor H, who doesn’t live anywhere below B’s floor. A lives above D’s floor but not in flat A. E doesn’t live on a prime numbered floor. C doesn’t live immediately above B.Solution
1. There are two floors between the floors of J and G (both of them may or may not live in the same type of flat). J lives south west of B. J lives on first floor. 2. F lives 2 floors above B (both live in the same type of flat). 3. D lives immediately above H, who doesn’t live below anywhere B’s floor. So, G must live above J’s floor either in flat A or B. Both F and B live in flat B. Case 1: When G lives in the flat B. 4. A lives above D’s floor but not in flat A. E doesn’t live in a prime numbered floor. C doesn’t live immediately above B. So, A lives in on 5th floor in flat B. Case 2(b): When both G and J live in the same flat and J live on 1st floor. The final arrangement is as follows:
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?