## Adobe Interview Question

Backend Developers**Country:**India

**Interview Type:**In-Person

```
def find_max_subset(glist):
maxset = None
find_subset(glist,len(glist)-1, maxset, [])
def find_subset(glist, n, maxset, cur):
if n < 0:
if cur and max(cur) < min(cur)*2:
print(cur)
else:
ch = glist[n]
cur.append(ch)
find_subset(glist, n-1, maxset, cur)
cur.pop()
find_subset(glist, n-1, maxset, cur)
```

def find_max_subset(glist):

maxset = None

find_subset(glist,len(glist)-1, maxset, [])

def find_subset(glist, n, maxset, cur):

if n < 0:

if cur and max(cur) < min(cur)*2:

print(cur)

else:

ch = glist[n]

cur.append(ch)

find_subset(glist, n-1, maxset, cur)

cur.pop()

find_subset(glist, n-1, maxset, cur)

```
def find_max_subset(glist):
maxset = None
find_subset(glist,len(glist)-1, maxset, [])
def find_subset(glist, n, maxset, cur):
if n < 0:
if cur and max(cur) < min(cur)*2:
print(cur)
else:
ch = glist[n]
cur.append(ch)
find_subset(glist, n-1, maxset, cur)
cur.pop()
find_subset(glist, n-1, maxset, cur)
```

###

find_max_subset([1,2,3,4])

[4, 3]

[4]

[3, 2]

[3]

[2]

[1]

- anon March 19, 2020