Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.
This project is maintained by chankruze
You’re given a representation of a 5x5 2D map, and if you can only move left, right, up, or down, determine how many moves you would have to make to get between two points on the map.
Determine the total number of moves that are needed between two points on a map. The points that you move between are marked with a P and the spaces in between are marked with X.
A string that represents the 2D space starting at the top left. Each level from top to bottom is separated by a comma (,
).
An integer that represents the total number of moves that you had to make.
XPXXX,XXXXX,XXXXX,XXXPX,XXXXX
5
The map looks as:
XPXXX
XXXXX
XXXXX
XXXPX
XXXXX
You had to move right 2 spaces, then down 3 spaces for a total of 5 moves.
Language | Solution |
---|---|
C | not available |
CPP | not available |
C# | not available |
Python | available |
Java | not available |
Ruby | not available |
Swift | not available |