analyze algorithm