DFS non cursion
struct edge changed to name to struct node
find minimum in a rotated sorted array