fix: use const vector& instead of array

This commit is contained in:
realstealthninja
2024-10-04 20:48:48 +05:30
parent 1c2e186369
commit a16a4bc9e8

View File

@@ -7,7 +7,7 @@
#include <vector>
using namespace std;
int LIS(int arr[], int n) {
int LIS(const std::vector<int>& arr, int n) {
set<int> active; // The current built LIS.
active.insert(arr[0]);
// Loop through every element.