Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
lis_example.cc File Reference

Visual walkthrough for LIS and LNDS variants. More...

#include <iostream>
#include <iomanip>
#include <LIS.H>
#include <print_rule.H>
Include dependency graph for lis_example.cc:

Go to the source code of this file.

Functions

int main ()
 Demonstrates usage of Aleph-w LIS/LNDS utilities by running several example scenarios and printing their inputs and results.
 

Detailed Description

Visual walkthrough for LIS and LNDS variants.

Definition in file lis_example.cc.

Function Documentation

◆ main()

int main ( )

Demonstrates usage of Aleph-w LIS/LNDS utilities by running several example scenarios and printing their inputs and results.

Runs five scenarios: classic LIS, already sorted, reverse sorted, longest non-decreasing subsequence, and decreasing subsequences via a custom comparator. Each scenario prints the input sequence, one computed subsequence, and its length using Aleph-w helpers.

Returns
int Exit code (0 on success).

Definition at line 101 of file lis_example.cc.

References Aleph::divide_and_conquer_partition_dp(), Aleph::lis_length(), Aleph::longest_increasing_subsequence(), Aleph::longest_nondecreasing_subsequence(), print_array(), and Aleph::print_rule().