Question
Six persons, F, G, H, I, J and K, sit in a row and face
in north direction. Only two persons sit to the right of J. I sits immediate left of K. Neither F nor I sits at an extreme end. G sits immediate left of H, who doesn't sit at an extreme end. Who sits second to the right of F?Solution
Only two persons sit to the right of J. I sits immediate left of K. Neither F nor I sits at an extreme end. G sits immediate left of H, who doesn't sit at an extreme end. We get J sits 4th from the extreme left end. I sits immediate right of J or second to the left of J. K sits second to the right of J or immediate left of J. G, H, F, I and K sits first, second, third, fifth and sixth from the extreme left end of the row. Therefore, the sitting arrangement is given below: GÂ Â Â Â Â Â Â Â HÂ Â Â Â Â Â Â Â FÂ Â Â Â Â Â Â Â Â JÂ Â Â Â Â Â Â Â Â IÂ Â Â Â Â Â Â Â Â Â K
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
    ...