Story:
Legend has it that deep within the heart of the forest lies Sasquatch's hidden treasure, a coveted prize sought by adventurers far and wide. Rumors swirl of a treacherous cave filled with perilous obstacles, guarded by the elusive Sasquatch himself. Many have embarked on the journey to uncover the treasure, but few have returned to tell the tale.
Undeterred by the challenges that lie ahead, your team of intrepid explorers sets out to unravel the mystery of Sasquatch's treasure. Armed with a map of the cave's layout and fueled by the promise of untold riches, you venture into the darkness, determined to overcome whatever obstacles stand in your way.
Challenge:
You have discovered the entrance to Sasquatch's cave, marked by a large 'E' etched into the stone. With trepidation, you step inside, ready to embark on the adventure of a lifetime. Your mission is clear: determine whether it's possible to reach Sasquatch's hidden treasure marked by 'X'.
Given a 2D array representing the layout of the cave, with 'E' marking the entrance, 'X' marking the treasure, 'W' representing walls, and '*' marking the path, your task is to analyze the cave's layout and devise a strategy to determine whether it's possible to reach the treasure.
Remember, not all paths may lead to the treasure, and Sasquatch's cave is filled with twists and turns. Will you uncover the route to the legendary treasure, or will the obstacles prove insurmountable?
Good luck, brave adventurers! The fate of Sasquatch's treasure rests in your hands. Dare to journey into the unknown and solve the challenge of Sasquatch's Treasure Hunt: Can You Reach the Treasure?
Map of Sasquatch's Treasure Cave. Image generated by Microsoft's Copilot.