Open In App

Adobe Interview Experience | Set 29 ( Off-Campus)

Preparation source links: 
 



  1. http://gohired.in/adobe/ 

     

  2. https://www.geeksforgeeks.org/tag/Adobe/

I thank geeksforgeeks for my success. Wishing all the geeks all the best for their future. 🙂 

 



 

 

for (int i=0; i < m; i++) {
   if( a[i]==x)
      return i;
} 
return -1;
  1. Then he asked that in this loop there are 2 comparisons in each iteration, i 
    I again wrote: 
     

a[n]=x;
for(int i=0; a[i]!=x; i++); //only one comparison now.
   if(i< n)
      return i;
return -1;
  1.  

Article Tags :