10int LIS(
const std::vector<int>& arr,
int n) {
12 active.insert(arr[0]);
14 for (
int i = 1; i < n; ++i) {
15 auto get = active.lower_bound(arr[i]);
16 if (get == active.end()) {
17 active.insert(arr[i]);
26 active.insert(arr[i]);
32int main(
int argc,
char const* argv[]) {
34 cout <<
"Enter size of array: ";
36 std::vector<int> a(n);
37 cout <<
"Enter array elements: ";
38 for (
int i = 0; i < n; ++i) {
uint64_t LIS(const std::vector< uint64_t > &a, const uint32_t &n)
Calculate the longest increasing subsequence for the specified numbers.