An array is defined to be `odd-heavy` if it contains at least one odd element and every element whose value is `odd` is greater than 
every even-valued element. 

eg.
```
Array [11,4,9,2,8] is odd-heavy 
because:- its odd elements [11,9] are greater than all the even elements [4,2,8]

Array [11,4,9,2,3,10] is not odd-heavy
because:- one of it's even element 10 from [4,2,10] is greater than two of its odd elements [9,3] from [ 11,9,3]

```
write a function called `isOddHeavy` or `is_odd_heavy` that accepts an integer array and returns `true` if the array is `odd-heavy` else return `false`.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Data structures

Starter code: def is_odd_heavy(arr):
	

Solutions:
def is_odd_heavy(arr):
	(maxEven, minOdd) = (f(filter(lambda n: n % 2 == v, arr), default=float('-inf')) for (f, v) in ((max, 0), (min, 1)))
	return maxEven < minOdd


odd = lambda x: x & 1

def is_odd_heavy(arr):
	it = iter(sorted(arr))
	return any(map(odd, it)) and all(map(odd, it))


def is_odd_heavy(a):
	odd = list(filter(lambda x: x & 1, a)) or []
	even = list(filter(lambda x: not x & 1, a))
	return all((all(map(lambda x: x < i, even)) for i in odd)) if odd else False


def is_odd_heavy(xs):
	return bool(xs) and min((x for x in xs if x % 2 == 1), default=min(xs) - 1) > max((x for x in xs if x % 2 == 0), default=min(xs) - 1)


is_odd_heavy = lambda a: max([n for n in a if -~n % 2] or [float('-inf')]) < min([n for n in a if n % 2] or [float('-inf')])


def is_odd_heavy(arr):
	is_odd = False
	for index in range(len(arr) - 1):
		if sorted(arr)[index] % 2 == 1 and sorted(arr)[index + 1] % 2 == 0:
			return False
		if sorted(arr)[index] % 2 == 1 or sorted(arr)[index + 1] % 2 == 1:
			is_odd = True
	return is_odd if len(arr) != 1 else arr[0] % 2 == 1