title: Longest Increasing Odd Even Subsequence
signature: function longest_increasing_odd_even_subsequence(arr, n)
source_py: def longest_increasing_odd_even_subsequence(arr, n):
      lioes = list()
      maxLen = 0
      for i in range(n):
          lioes.append(1)
      i = 1
      for i in range(n):
          for j in range(i):
              if ((arr[i] > arr[j]) and (((arr[i] + arr[j]) % 2) != 0) and (lioes[i] < (lioes[j] + 1))):
                  lioes[i] = (lioes[j] + 1)
      for i in range(n):
          if (maxLen < lioes[i]):
              maxLen = lioes[i]
      return maxLen
source_cpp: int longest_increasing_odd_even_subsequence(vector<int> arr, int n) {
    int lioes [ n ];
    int maxLen = 0;
    for ( int i = 0;
    i < n;
    i ++ ) lioes [ i ] = 1;
    for ( int i = 1;
    i < n;
    i ++ ) for ( int j = 0;
    j < i;
    j ++ ) if ( arr [ i ] > arr [ j ] && ( arr [ i ] + arr [ j ] ) % 2 != 0 && lioes [ i ] < lioes [ j ] + 1 ) lioes [ i ] = lioes [ j ] + 1;
    for ( int i = 0;
    i < n;
    i ++ ) if ( maxLen < lioes [ i ] ) maxLen = lioes [ i ];
    return maxLen;
  }