Anonymous interview question

Based on arrays , dynamic programming,graphs