Longest increasing subsequence in 51 bytes
One joy of code golf is when a complex algorithm reduces to a short “magic” formula. codeglf.com hosted a challenge to find the shortest Python program to calculate the length of the longest increasing subsequence (LIS). LIS is a classic algorithmic task: given an array of numbers, what is the longest subsequence (not necessarily contiguous) […]