Question
On which of the following floor number does D live?
Answer the questions based on the information given below. Eight persons A, B, C, D, E, F, G and H live on different floors of aneight-storey building, where the bottommost floor is 1 and the floor above it is 2 and so on. They all have different genders i.e. male and female. Not more than two persons of same genders live on adjacent floors.Number of males is more than that of the number of females. Three persons live between D and the one who lives two floors above B, who is male. B doesn’t live above the 4th floor. A lives two floors below C, neither of them lives adjacent to D and B. D lives above C. The one who lives on the 2nd floor from the top is female. The number of person lives above G is one more than the number of person lives below E. At most two people live above G. Neither A nor G is female. D doesn’t live adjacent to E. H lives above F, who is male.Solution
Three persons live between D and the one who lives two floors above B, who is male. B doesn’t live above 4th A lives two floors below C, neither of them lives adjacent to D nor B. The one who live on 2nd floor from the top is female. The number of persons lives above G is one more than the number of persons lives below E. Neither A nor G is female. At most two people live above G. D doesn’t sit adjacent to E. D lives above C. H lives above F, who is male.
Which algorithm guarantees minimum spanning tree and will produce a different tree depending on tie-breaking?
Which of the following is NOT a divide-and-conquer algorithm?
Which data structure gives amortized O(α(n)) time for union and find operations, where α is inverse Ackermann?
Which of the following sorting algorithms is considered stable (i.e., preserves the relative order of equal elements)?
In the context of searching, what is the primary advantage of using hashing?
Output of below code
public class Prg {
public static void main(String args[]){
System.out.print("A" + "B" + 'A');
}
...A directed acyclic graph (DAG) has 10 vertices and 15 edges. What is the maximum possible number of topological orderings?
Which shortest-path algorithm is appropriate for graphs with non-negative weights and supports decrease-key efficiently for faster performance?
In mobile computing, what is the main feature of pervasive computing?
Consider the following Python code snippet for binary search:
  def binary_search(arr, target):
    low = 0
    ...