add maximum gap problem