Comcast Interview Question

Find minimum number of deletions to make an array almost sorted.