This is the key line in this method . Note that all recursive / calls have a separate copy of num , but they all share same copy of * dupNum . We divide num while moving up the recursion tree
if ( ! isPalUtil ( num / 10 , dupNum ) ) return false ;