This function mainly does basic error checking and calls findMissingUtil
function findMissing ( $ arr1 , $ arr2 , $ M , $ N ) { if ( $ N == $ M - 1 ) echo " Missing ▁ Element ▁ is ▁ " , findMissingUtil ( $ arr1 , $ arr2 , $ M ) ; else if ( $ M == $ N - 1 ) echo " Missing ▁ Element ▁ is ▁ " , findMissingUtil ( $ arr2 , $ arr1 , $ N ) ; else echo " Invalid ▁ Input " ; }