Deterministic And Nondeterministic Algorithm