Morse Theory: Smooth and Discrete