Discrete and Continuous Difference of Submodular Minimization