It depends what you mean. Using a vector and push back instead of a fixed array means that you don't have control of how much memory you will use. Based on the problem specification you can know exactly how much memory you will use in the worst case, therefore use a fixed array.