Relative Content

Tag Archive for javac++algorithmgraph-theorybreadth-first-search

An Algorithmic Problem : Maze Search for Shortest Path and Minimum Number of Turns (NOT ONLY Shortest Path)

Input a positive integer N, followed by the matrix A represented as N*N elements consisting of 0s or 1s, entered row by row, which depicts a two-dimensional map. Next, input the starting row coordinate L1, starting column coordinate C1, and ending row coordinate L2, ending column coordinate C2. The objective is to find a path in matrix A from the starting coordinates to the ending coordinates that is both passable and has the shortest distance and minimum number of turns. Additionally, the number of turns in the found path must be less than 10