mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-10 05:57:14 +08:00
fix: vla in egg_dropping_puzzel
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
#include <climits>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int eggDrop(int n, int k) {
|
||||
std::vector<std::vector<int> > eggFloor;
|
||||
eggFloor.reserve(n + 1);
|
||||
std::vector<std::vector<int> > eggFloor(n + 1, std::vector<int>(k + 1));
|
||||
|
||||
int result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user