In this paper, we give a necessary and sufficient condition for an algebraic ODE to have an algebraic general solution. For a first order autonomous ODE, we give an optimal bound for the degree of its algebraic general solutions and a polynomial-time algorithm to compute an algebraic general solution if it exists. Here an algebraic ODE means that an ODE given by a differential polynomial.