On this day, as we celebrate progress and perseverance (and perhaps even pause to appreciate the dedication of caregivers on International Nurses Day), challenge yourself to navigate through a maze using backtracking.
You are given a 2D grid (maze) represented by a matrix of integers where:
Your task is to find all possible paths from the top-left corner (starting point) to the bottom-right corner (destination) of the maze. You may only move in four directions: Up (U), Down (D), Left (L), and Right (R).
Below is some starter code in several languages. Use the provided function signature to begin your backtracking solution. The function should return all valid paths as described.
Happy coding and enjoy solving the maze!