Add validation check of input parameters
Add validation check of input parameters

TheStefan/c-algorithms,TheStefan/c-algorithms,colin-zhang/c-algorithms,fragglet/c-algorithms,fragglet/c-algorithms,colin-zhang/c-algorithms,colin-zhang/c-algorithms,TheStefan/c-algorithms,fragglet/c-algorithms