Question
The HCF of two numbers is 18 and their LCM is 540. If
one of the numbers is 90, find the other number.Solution
For two numbers a and b: a × b = HCF × LCM So, 90 × b = 18 × 540 18 × 540 = (18 × 54) × 10 = 972 × 10 = 9720 Thus b = 9720 / 90 = 108 Answer: The other number is 108.
The time complexity of computing the all-pairs shortest paths in a dense graph with V vertices using Floyd–Warshall is:
Which of the following statements about Dijkstra’s algorithm is true?
Which algorithm guarantees minimum spanning tree and will produce a different tree depending on tie-breaking?
Which algorithm finds the longest common subsequence (LCS) of two sequences?
Which data structure is most suitable for implementing recursion?
What is the time complexity of inserting an element in a heap?
Which data structure gives amortized O(α(n)) time for union and find operations, where α is inverse Ackermann?
Which algorithm returns a minimum spanning tree (MST) and uses a priority queue to select the next edge connected to the growing tree?
A directed acyclic graph (DAG) has 10 vertices and 15 edges. What is the maximum possible number of topological orderings?
Which data structure is used for implementing recursive function calls?