Code learning to colour graphs for various problems in the compiler space such as register allocation and layout of multiple inheritance based classes. This is a simple implementation put together to check how it worked before I started using the algorithm for various problems in the Argon compiler. The algorithm makes use of recursion but there are plenty examples of algorithms that are linear. This code is based on a simple 4K graph as show below.
![Graph][https://github.com/vincent-coetzee/GraphColoring/blob/main/images/images.png]