mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-07 13:53:16 +08:00
fix: use const vector& instead of array
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user