Before writing a single line, clarify the input size. Is 10610 to the sixth power ? This tells you if an solution is acceptable or if you must aim for
Don't jump straight into your IDE. Professional problem solving follows a structured sequence: Problem Solving in Data Structures & Algorithms...
Finding the shortest path in an unweighted graph or tree level-order traversal. Before writing a single line, clarify the input size