From the course: Advanced Go Programming: Data Structures, Code Architecture, and Testing
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Challenge introduction - Go Tutorial
From the course: Advanced Go Programming: Data Structures, Code Architecture, and Testing
Challenge introduction
(upbeat music) - [Instructor] The fourth challenge will give you the opportunity to practice everything you've learned in solving the counting paths problem. Given a matrix of size m by n, start at the Element at coordinates 0,0 and end at the element m,n. You can move either to the right or downwards by using the correct indices. Every time you land on a given square, you incur the costs specified by the matrix. Your challenge is to implement a function that counts the number of paths through a matrix with a specified cost. In this example, you have two paths that satisfy the specified cost of eight. Traveling along the other paths will incur a larger cost. Of course, I've written some code that will make it easier for you to solve this challenge. On lines 13 to 17, I've created a Maze struct for you. This should make it possible for you to solve this challenge by not having to manipulate matrix values directly. On…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.