input: Write a function to find the longest increasing subsequence in a given array.
  assert find_longest_increasing_subsequence([10, 9, 2, 5, 3, 7, 101, 18]) == [2, 3, 7, 18]
  assert find_longest_increasing_subsequence([0, 1, 0, 3, 2, 3]) == [0, 1, 2, 3]
  assert find_longest_increasing_subsequence([7, 7, 7, 7, 7, 7, 7]) == [7]
output: def find_longest_increasing_subsequence(arr):
      if not arr:
          return []
  
      n = len(arr)
      dp = [1] * n
      prev = [-1] * n
  
      max_len = 0
      max_index = 0
  
      for i in range(n):
          for j in range(i):
              if arr[i] > arr[j] and dp[i] < dp[j] + 1:
                  dp[i] = dp[j] + 1
                  prev[i] = j
          if dp[i] > max_len:
              max_len = dp[i]
              max_index = i
  
      lis = []
      while max_index != -1:
          lis.append(arr[max_index])
          max_index = prev[max_index]
  
      return lis[::-1]