Skip to content

In this project, given a matrix of integers where each cell represents a weight, you are tasked with writing a program that finds a continuous path that combines any element of the first row with any element of the last row in the matrix, aiming to minimize the sum of items along the path.

Notifications You must be signed in to change notification settings

ozlemkayikcii/ShortestPathWay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

ShortestPathWay

In this project, given a matrix of integers where each cell represents a weight, you are tasked with writing a program that finds a continuous path that combines any element of the first row with any element of the last row in the matrix, aiming to minimize the sum of items along the path. When visualized conventionally, the path strictly moves downwards. We can approach this problem gradually. What if the matrix had only one row? In this scenario, the minimum weight path would simply be the minimum weight item from the first row. What if we added one more row? In this case, we could find the minimum path to a particular item in the row by identifying the lowest value in the first row and then traversing to the second row from that item. This analysis continues as we add more rows to the matrix until it is fully populated. The outcome of this process is another matrix entirely filled with minimum path weights to each item.

image image

image

About

In this project, given a matrix of integers where each cell represents a weight, you are tasked with writing a program that finds a continuous path that combines any element of the first row with any element of the last row in the matrix, aiming to minimize the sum of items along the path.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages