GO Solution For UVa 10178 - Count the Faces.. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

Figure: A planar graph

A planar graph is defined as follows

Definition: A planar graph is one that can be drawn on a plane in such a way that there are no “edge crossings,” i.e. edges intersects only at their common vertices.

The figure on the right shows a planar graph. The six different faces

...

You can find the full details of the problem Count the Faces. at UVa Online Judge

Sample Input

1 0
3 3
A B
B C
A C

Sample Output

1
2

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985