I am taking an input, e.g. 4 1 3 1 2 2 4
First line is number of nodes, lines after that are the edges. I have to attempt to color the graph, and if I can't, I need to list a cycle in the graph that is causing the error.
This is fine so far, except one of the graphs contains 1,000,000 nodes. Everytime I try to use it I get a Stack Overflow error, even though I streamlined it more, and raised the max heap size of eclipse to 1024m.
I'm not asking for code, just asking if I am doing something blatantly wrong to keep getting errors.