Add longest increasing sequence algorithm