Given a list of integers, write a function to find the longest increasing subsequence.
Return one valid longest strictly increasing subsequence, preserving the original order but not necessarily contiguity. If the input is empty, return an empty list. The expected solution should run in O(n log n) time.
Input: nums, a list of integers.
Output: A list containing one longest increasing subsequence.
def longest_increasing_subsequence(nums):