You are given a maze represented as a 2D grid of characters. Each cell in the maze can be one of the following:
Write a function that finds a valid path from the start ('S') to the exit ('E') using backtracking. You may move one cell at a time in the four cardinal directions (up, down, left, right). Return the path as a list (or array) of coordinates, where each coordinate is a pair of zero-indexed row and column indices. If no path exists, return an empty list.
Example:
For the maze:
S . . #
# . # .
. . . E
A possible output (one of many valid paths) could be:
[[0,0], [0,1], [0,2], [1,1], [2,1], [2,2], [2,3]]
Notes: