implemented recursive algorithm for finding longest subsequence of
increasing values