Greedy LIS Algorithm
Alice recently learnt about the [Longest Increasing Subsequence (LIS)](https://en.wikipedia.org/wiki/Longest_increasing_subsequence) problem. She was convinced she found a correct greedy algorithm to solve the problem. Let $A$ be an array of size $N$ for which we want to find the LIS. Then, the code of Alice's algorithm is as follows : ```cpp int alicelis(int A[], int N){ int count = 1;
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start