PYQPulse
HomeMocksPracticePYQsUpdatesDashboard
PYQPulse

Timing-accurate mock tests and PYQs for SSC, Banking and Railway exams — so the real paper feels like a revision.

Exams

  • SSC exams
  • Banking exams
  • Railway exams
  • All exams

Practice

  • Practice questions
  • Mock test series
  • Sectional tests
  • Year-wise PYQs
  • Performance analytics

Company

  • About us
  • Help Centre
  • Pricing
  • Sign in

Legal

  • Privacy Policy
  • Terms of Service

Contact

  • hello@testwala.co.in
  • Telegram
  • +91 62816 87760

Practice interface modeled on the official exam pattern — not the official examination. PYQPulse is not affiliated with the Staff Selection Commission, IBPS, SBI, RBI, NABARD, SEBI or Indian Railways.

© 2026 PYQPulse. All rights reserved.

Built for aspirants, by aspirants.

HomeMocksPracticeStats
  1. Home
  2. ›
  3. PYQs
  4. ›
  5. RRB Junior Engineer / DMS / CMA
  6. ›
  7. 2019
  8. ›
  9. Q3716

RRB Junior Engineer / DMS / CMA 2019 · Question 3716 of 3719

Which of the following algorithm is used to solve the all-pair shortest path problem?

  1. AFloyd- Warshall ’s algorithmCorrect
  2. BDijkstra's algorithm
  3. CBellman-Ford’s algorithm
  4. DPrim’s algorithm

Answer: A. Floyd- Warshall ’s algorithm

Explanation

Floyd-Warshall algorithm The all pair shortest path algorithm is also known as Floyd-Warshall algorithm. It is used to find all pair shortest path problem from a given weighted graph. As a result of this algorithm, it will generate a matrix, which will represent the minimum distance from any node to all other nodes in the graph. Dijkstra’s algorithm The algorithm was developed by a Dutch computer scientist Edsger W. Dijkstra in 1956. It is used to find the shortest path between a node/vertex (source node) to any (or every) other nodes/vertices (destination nodes) in a graph. A graph is basically an interconnection of nodes connected by edges. This algorithm is sometimes referred to as Single Source Shortest Path Algorithm due to its nature of implementation. The Bellman–Ford algorithm It is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. It is slower than Dijkstra's algorithm for the same problem, but more versatile, as it is capable of handling graphs in which some of the edge weights are negative numbers. Prim's algorithm To find minimum cost spanning tree (as Kruskal's algorithm) uses the greedy approach. It is a minimum spanning tree algorithm that takes a graph as input and finds the subset of the edges of that graph which form a tree that includes every vertex has the minimum sum of weights among all the trees that can be formed from the graph

Source: RRB JE 2019 (CBT 2) (IT) Previous Year Paper (30 Aug 2019) — prepp.in solved-paper PDF (answer key with explanations) · reliable-secondary

← Q3715View full paper (3719 questions)Q3717 →

Practice the full RRB Junior Engineer / DMS / CMA 2019 paper

Timed test with all 3719 questions, just like the real exam.

Start test