Algorithm data structure segtree lazy segtree geometry convex hull intersection graph bellman ford dijkstra mst lca scc number theory extended euclidean algorithm combination miller rabin