Question
In the design and analysis of algorithms, which of the
following algorithms is based on the greedy approach?Solution
Dijkstra’s algorithm is based on the greedy approach, which selects the locally optimal solution at each step with the goal of finding the shortest path from the source to all other vertices in a graph. The algorithm repeatedly picks the nearest unvisited vertex and calculates the shortest path to all its neighbors, ensuring optimal solutions for each subproblem. Merge Sort : A divide-and-conquer algorithm, not greedy. Depth-First Search : DFS is a traversal technique, not a greedy algorithm. Bellman-Ford Algorithm : This algorithm can handle negative weight edges, but it is not based on the greedy approach. Quick Sort : A divide-and-conquer algorithm, not greedy.
Which of the following caves was repurposed as a Christian cave?
Khadar and Bhangar are which types of soil?
When was the first general elections in Independent India held?
Which number will replace the question mark in the following sequence?
3, 6, 9, 18, 21, ?
Which Bharatanatyam dancer founded the Dipasikha Dance Foundation in Chennai in 1984?
Amnesty International is a _____________
Which Indian city will soon get its first robocop?
Indian army’s southern command is conducting a major military exercise in the desert of Rajasthan. The name of the exercise is:
Arrange the following events, which took place in the early decades of the 20th century, in chronological order:
1. First Session of Indian Natio...
In which state is the ‘Balphakram National Park’ situated?