Open In App

SymsTech Interview Experience

At SymsTech they resolve the problem of people and focus on developing a user-centric software solution that will help them to solve their real-life issues, for a better experience.

Process :



After completing this process, I got an internship offer from SymsTech. Now let’s see some questions which were asked in my interview.

Solution :






int binarysearch(int arr[], int n, int k) 
{
       int start = 0;
       int end = n-1;
       while(start<=end)
       {
          int mid = (start+end)/2;
           if(k>arr[mid])
           {
               start=mid+1;
           }
           else if(k<arr[mid])
           {
               end=mid-1;
           }
           else if(k==arr[mid])
           {
               return mid;
           }
       }
       return -1;
}

Article Tags :