## Adobe Interview Question for Backend Developers

Country: India
Interview Type: In-Person

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````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]``````

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````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)``````

Comment hidden because of low score. Click to expand.
0
of 0 vote

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)

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````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]

Comment hidden because of low score. Click to expand.
0
of 0 vote

ygiuhoipjokp'kjxrdytuyiuopkl';

Comment hidden because of low score. Click to expand.
0
of 0 vote

uytrewdertyuiu98765tewsq

Comment hidden because of low score. Click to expand.
0
of 0 vote

``kajfkljaklfja;jfkj``

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````def all_subarray(glist):
maxsub = float('-inf')
for i in range(len(glist)):
acc = []
for j in range(i,-1,-1):
acc.append(glist[j])
if min(acc)*2 > max(acc):
maxsub = max(len(acc),maxsub)
print(acc)
print(maxsub)

all_subarray([1,2,3,4])``````

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````int max_len=INT_MIN;
for(int i=0;i<a.size();i++)
{
vector<int>arr;
for(int j=i;j>=0;j--)
{
arr.push_back(j);
int mini=*min_element(arr.begin(),arr.end());
int maxi=*max_element(arr.begin(),arr.end());
if(mini*2>maxi)
{
max_len=max(maxi-mini+1,max_len);

}
}``````

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````int max_len=INT_MIN;
for(int i=0;i<a.size();i++)
{
vector<int>arr;
for(int j=i;j>=0;j--)
{
arr.push_back(j);
int mini=*min_element(arr.begin(),arr.end());
int maxi=*max_element(arr.begin(),arr.end());
if(mini*2>maxi)
{
max_len=max(maxi-mini+1,max_len);

}
}``````

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````int max_len=INT_MIN;
for(int i=0;i<a.size();i++)
{
vector<int>arr;
for(int j=i;j>=0;j--)
{
arr.push_back(j);
int mini=*min_element(arr.begin(),arr.end());
int maxi=*max_element(arr.begin(),arr.end());
if(mini*2>maxi)
{
max_len=max(maxi-mini+1,max_len);

}
}``````

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.