Trace LIS on . Let = length of LIS ending at . (just ). (just , can't extend from ). (just ). (extend from : ). (extend from : ). (extend from or : ). (extend from : ). (extend from : ).
Answer: .
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Tracing the O(n^2) algorithm
Trace LIS on . Let = length of LIS ending at . (just ). (just , can't extend from ). (just ). (extend from : ). (extend from : ). (extend from or : ). (extend from : ). (extend from : ).
Answer: .