Toorey interview question

1.array based 2.Pattern 3.Dp 4.logical