Published in


Difficult Python Question 4 — Checking If Maze Is Solvable

You are given a 2-dimensional list representing a maze:

maze = [
["S", "#", "-", "-", "-"],
["-", "#", "-", "#", "-"],
["-", "#", "-", "#", "-"],
["-", "#", "-", "#", "-"],
["-", "-", "-", "#", "-"],
["#", "-", "-", "#", "X"]

Some Rules:

  • S represents the starting spot of the player




Everything connected with Tech & Code. Follow to join our 900K+ monthly readers

Recommended from Medium

Introduction to ZFinance (ZFI)

Code Optimization — The what and the how?

Unity Development & Pipelines

Contrast between HTTP/1.1 and HTTP/2.0

Week 1 — Describing basic OO Principles

OSPF (Open Short Path First)

Should Recyclerview Adapter have the responsibility of data in MVVM architecture?

View 3D model fast on Tsridiopen app run on ios and android

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Full-time Software Engineer. Part-time Python Tutor, Tech Writer & Crypto Investor. Free-time pianist, gamer, gardener & self-proclaimed cook

More from Medium

‘Break’ & ‘Continue’ In Python — Explained in Simple Terms

Did You Know Float(“NaN”) and Float(“inf”) Exist in Python?

Randomness in Python: A Comprehensive Guide

Randomness in Python: 3 Types of Operations

How to write better scientific code in Python?