Min Max Algorithm Time Complexity