Weekend Programming Challenge ISSUE-11 – Maze


Image

Problem:

Let’s have maze with size X x Y where X and Y are integer (3..100) .
The maze is defined with strings, where in the string ‘W’ is wall, ‘@’ is obstracle and ‘ ‘ is air.
Make code which finds the larges by area connected obstracles in the maze.

For instance:

Input:

WWWWWWWWWW
W  WW    W
W       WW
W  @@    W
W @@     W
W      @ W
W@    @@ W
WWWWWWWWWW

should output: 4 as the largest area obstracles is composed by 4 @ connected together.

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday June 2nd.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

5 Comments (+add yours?)

  1. ultimateohm
    May 31, 2013 @ 21:07:35

    Does this mean finding maximum contiguous obstracles?

    Reply

  2. DrWheetos
    May 31, 2013 @ 21:30:36

    And would the whole internal area of an obstacle need to be an obstacle too? Or is it ok if just the perimeter were obstacles?

    Reply

  3. Snaksa
    Jun 03, 2013 @ 19:05:29

    This is a very interesting challenge. I know how to do it with matrix filled with 0 and 1 but I’m wondering how can we do it with symbols. Especially how is possible to enter an empty symbol. That’s why I’m looking forward to see the solutions 🙂

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: