Given module calculates the minimum spanning tree for a graph using Prim's algorithm. This algorithm is implemented using heapq module.
Given module finds the minimum element in an array between position i to j. RMQ can be used in problems directly or can be applied to implement other task like the Lowest Common Ancestor problem.
Python program to find Lowest Common Ancestor (LCA) of n1 and n2 using one traversal of Binary tree