Graph Planarity

A challenge by mousetail avatar mousetail

Description

A graph is planar if it’s possible to draw onto a plane with no intersecting edges.

I explained some context for the algorithm here: github.com/mousetail/graphs/blob/…/README.md

Input is given as a comma separated list of edges fore each vertex. Output only the graphs that are planar. Each graph is fully connected and has up to 200 total vertices.

Input Format

The input format will be: One graph per line, a space separated list of node indexes that the nth node connects to. For example

1, 0,2 1

Means node 0 has an edge to 1, 1 had edges to 0 and finally node 2 has one edge to node 1.

Leaderboard

Author Score
#1 ovs-code avatar ovs-code 375
#2 mousetail avatar mousetail 566
#3 AlephSquirrel avatar AlephSquirrel 839
#4 NicknamedTwice avatar NicknamedTwice 1278
Challenge ends in 12 weeks, 3 days
You must be logged in to submit a solution.