I have code that solves the "Traveling Salesman" problem using "Kruskal's algorithm" for a code competition site.
The code run and generates the correct result, but has O(n3) complexity. I am not sure my code implements "Kruskal's algorithm" correctly.
Is it OK to ask question about algorithms and if the code implements the algorithm correctly for the problem at hand?
Is it OK to ask questions soliciting (at the same time) alternative algorithms to solve the problem?