Finding the Longest Increasing Sequence is an interesting problem and there are multiple solutions available with varying time complexity. The solution that i plan to share today is the uses of Patience Sort to find such a sequence. The solution finds a particular longest increasing sub-sequence as the original sequence may contain more than one such sequence. In 1999 The Bulletin of the American Mathematical Society published a paper by David Aldous and Persi Diaconis entitled: “Longest Increasing Subsequences: From Patience Sorting to the Baik-Deift-Johansson Theorem”. I have implemented this solution in C# and derived it from this excellent article which provides a Python implementation for the same. This is how patience sort works Take a deck of cards labeled 1, 2, 3, … , n. The deck is shuffled, cards are turned up one at a time and dealt into piles on the table, according to the rule A low card may be placed on a higher card (e.g. 2 may be placed on 7), or...
My experiments with technology !