It mainly describes the common algorithm I have met.