I'm reviewing a programming problem from a local programming contest.
You can download the problem http://www.vlaamseprogrammeerwedstrijd.be/2011/opgaves/cat2-2011/loodgieter.pdf. It's in dutch but the pictures will help to understand it.
You receive a m*m grid as input with some pipes and some missing spots (the questionmarks). The remaining pipes have to be placed in the grid so that they connect with the others.
Each pipe is represented as a letter (see picture on page 2). The letter 'A' has value 1, 'B' has value 2,..
Does someone knows how to solve this problem by backtracking in Java?