Question: Please use C ,not C++ Write a program to find the longest monotonic increasing sub-sequence of the given sequence. For example, given the sequence 1
Please use C ,not C++

Write a program to find the longest monotonic increasing sub-sequence of the given sequence. For example, given the sequence 1 3 54 2 6 7; the longest monotonic increasing sub-sequence is 13 56 7 by removing 4 and 2. Input is read from the text file monosequence.inp consisting of: The first line contains a single integer n which is the number of elements of the given sequence. The second line contains n integers a, a2, ., an, where a is the value of element i. Output is written to the text file monosequence.out consisting of ONLY ONE NUMBER which is the longest length of the monotonic increasing sub-sequence. Example: monosequence.inp monosequence.out 7 13 54 267 Limitation: - 1Sn s 105 Inls 106 Processing time of the proposed algorithm s 1 second Notice: The name of the source code file is monosequence.cpp or monosequence.c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
