TRANSPORTATION TO ACUPUNCTURE APPOINTMENT: The standard mileage rate allowed for out-of-pocket expenses for a car when you use it for medical reasons. Bus, taxi, train and plane fares primarily for and essential to medical care are also included.
Let LIS(Ë) denote the length of the longest increasing sequence in Ë. A sequence Ëis monotone if Ë(1) Ë(2) Ë(n). We consider edit operations on a sequence. where a single edit operation involves deleting a single element of the sequence and inserting it in. a new place.
Recursion leads to exponential algorithm as we solve overlapped subproblems again and again, and DP is quadratic algorithm. There is another algorithm that can find the size of LIS or construct LIS in O(N log N) time complexity. Wiki has good information on the problem, Longest increasing subsequence. See Algorithmist link for implementation of algorithm,