diff options
| author | MZuenni <michi.zuendorf@gmail.com> | 2023-03-01 11:36:26 +0100 |
|---|---|---|
| committer | MZuenni <michi.zuendorf@gmail.com> | 2023-03-01 11:36:26 +0100 |
| commit | 12afe719ce268bb10aa93a910079a44eb08999b8 (patch) | |
| tree | 0937a117287eebe3942e0506d27143eff4980d09 /math/longestIncreasingSubsequence.cpp | |
| parent | ad8456f7c5d44d3c647b3a368050a5d2f39ae3c3 (diff) | |
removed trailing whitespaces and use more structured bindings
Diffstat (limited to 'math/longestIncreasingSubsequence.cpp')
| -rw-r--r-- | math/longestIncreasingSubsequence.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/math/longestIncreasingSubsequence.cpp b/math/longestIncreasingSubsequence.cpp index c2c5f3e..99bb141 100644 --- a/math/longestIncreasingSubsequence.cpp +++ b/math/longestIncreasingSubsequence.cpp @@ -2,7 +2,7 @@ vector<int> lis(vector<int> &seq) { int n = sz(seq), lisLength = 0, lisEnd = 0; vector<int> L(n), L_id(n), parents(n); for (int i = 0; i < n; i++) { - int pos = upper_bound(L.begin(), L.begin() + lisLength, + int pos = upper_bound(L.begin(), L.begin() + lisLength, seq[i]) - L.begin(); L[pos] = seq[i]; L_id[pos] = i; |
