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]

- anon March 19, 2020 | Flag Reply
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)

- anon000 March 19, 2020 | Flag Reply
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)

- anon000 March 19, 2020 | Flag Reply
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]

- anon_bio March 19, 2020 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

ygiuhoipjokp'kjxrdytuyiuopkl';

- Anonymous March 19, 2020 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

uytrewdertyuiu98765tewsq

- Anonymous March 19, 2020 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

kajfkljaklfja;jfkj

- Anonymous March 19, 2020 | Flag Reply
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])

- anon_bio March 19, 2020 | Flag Reply
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);
    
            }
        }

- Anonymous August 02, 2020 | Flag Reply
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);
    
            }
        }

- gunika August 02, 2020 | Flag Reply
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);
    
            }
        }

- rs9034087 August 02, 2020 | Flag Reply


Add a Comment
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.

Learn More

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.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More