SAP Labs interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

SAP Labs
upvote
share-icon
3 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Face to Face
Duration60 minutes
Interview date9 Nov 2015
Coding problem4

This was a technical interview round which lasted for 60 minutes. Questions based on DSA, OS and DBMS were discussed.

1. Factorial of a Number

Moderate
25m average time
70% success
0/80
Asked in companies
HCL TechnologiesWells FargoSquadstack

You are given an integer ‘N’. You have to print the value of Factorial of ‘N’. The Factorial of a number ‘N’ is defined as the product of all numbers from 1 to ‘N’.

For Example:
Consider if ‘N’ = 4, the Factorial of 4 will be the product of all numbers from 1 to 4, which is 1 * 2 * 3 * 4 = 24. Hence, the answer is 24.
Problem approach

Factorial of a number is basically the product of all integers smaller than or equal to that number. 
Iterative solution :
Run a for loop from 1 to n and take the product of all the numbers. 
The final product will be the desired answer.
Time Complexity : O(n)
Space Complexity : O(1)
Recursive solution :
The following recursive formula can be used for recursive solution :
n! = n * (n-1)!
n! = 1 if n = 0 or n = 1
Time Complexity : O(n)
Space Complexity : O(n)

Try solving now

2. Covid Vaccination

Moderate
0/80
Asked in companies
BNY MellonOracleAmerican Express

We are suffering from the Second wave of Covid-19. The Government is trying to increase its vaccination drives. Ninja wants to help the Government to plan an effective method to help increase vaccination following safety measures. Time is running out. Can you help the nation?

You are given two positive integers: ‘n,’ ‘maxVaccines’ denoting the number of days for which this vaccination drive will go on and the total number of vaccines available for the drive, respectively. You have to find the number of vaccines administered each day. You are also given a number ‘dayNumber,’ and we are interested to know the maximum number of vaccines that can be administered on ‘dayNumber’ th day.

The rules of the vaccination drive :

1. There should be a positive number of vaccines administered each day during the vaccination drive.

2. The absolute difference between the number of vaccines in two consecutive days should not exceed 1.

3. The sum of all the elements of the vaccines array does not exceed maxVaccines, that is, you cannot administer more vaccines than what is provided to you.

4. Vaccines administered on ‘dayNumber’ th day should be maximized.

Problem approach

Binary search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one. 
Pseudocode :
binarySearch(low,high,key)
{
while(low<=high)
{
mid=(low+high)/2
if(a[mid]key)
{
high=mid-1;
}
else
{
return mid;
}
}
return -1; //key not found
}

Try solving now

3. OS Question

What is a semaphore?

Problem approach

Semaphore is a non-negative variable shared between threads. It is a signaling mechanism, and a thread that is waiting on a semaphore can be signaled by another thread. It uses two atomic operations, 1)wait, and 2) signal for the process synchronization. There are two types of semaphore :Counting and binary semaphores

4. DBMS Question

Difference between RDBMS and DBMS

Problem approach

1.In DBMS, the data is stored as a file, while in RDBMS, the information is stored in tables.
2.DBMS can only be used by one single user, whereas multiple users can use RDMBS.
3.Client-server side interaction and architecture are only supported in RDBMS, whereas DBMS does not support client-server side interaction.
4.DBMS is lighter in its hardware and software requirements than RDMBS.

02
Round
Easy
Face to Face
Duration60 minutes
Interview date9 Nov 2015
Coding problem4

A 60 minute technical round to test programming concepts. Questions on DBMS, OOPS, OS were also discussed.

1. Bubble Sort

Easy
10m average time
90% success
0/40
Asked in companies
HCL TechnologiesSAP LabsHCL Technologies

Bubble Sort is one of the sorting algorithms that works by repeatedly swapping the adjacent elements of the array if they are not in sorted order.

You are given an unsorted array consisting of N non-negative integers. Your task is to sort the array in non-decreasing order using the Bubble Sort algorithm.

For Example:
Bubble Sort implementation for the given array:  {6,2,8,4,10} is shown below :-

Alt test

Problem approach

Bubble sort is a sorting algorithm that works on the repeatedly swapping of adjacent elements until they are not in the intended order. Algorithm :
BubbleSort(arr) 
for all array elements 
if arr[i] > arr[i+1] 
swap(arr[i], arr[i+1]) 
return arr

Time Complexity : O(n^2)

Try solving now

2. Merge Sort

Easy
15m average time
85% success
0/40
Asked in companies
Media.netHewlett Packard EnterpriseIBM

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm -

Merge sort is a Divide and Conquer based Algorithm. It divides the input array into two-parts, until the size of the input array is not ‘1’. In the return part, it will merge two sorted arrays a return a whole merged sorted array.

subsequence

The above illustrates shows how merge sort works.
Note :
It is compulsory to use the ‘Merge Sort’ algorithm.
Problem approach

Merge sort works on the principle of Divide and Conquer. Merge sort repeatedly breaks down a list into several sub lists until each sub list consists of a single element and merging those sub lists in a manner that results into a sorted list.
Algorithm :
MergeSort(arr[], l, r)
If r > l
1. Find the middle point to divide the array into two halves: 
middle m = l+ (r-l)/2
2. Call mergeSort for first half: 
Call mergeSort(arr, l, m)
3. Call mergeSort for second half:
Call mergeSort(arr, m+1, r)
4. Merge the two halves sorted in step 2 and 3:
Call merge(arr, l, m, r)
The time complexity of merge sort is O(nlogn) and auxiliary space is O(n).

Try solving now

3. DBMS Question

Given 2 tables : (empid,empname,dept) and (empid,salary).
Write sql query to list the details of employee having 5 maximum salaries

Problem approach

SELECT E.empid, E.empname, E.dept, F.salary
FROM Table1 E, Table2 F 
where E.empid == F.empid and ( select count(*) from F where salary > F.salary ) < 5order by salary desc;

4. DBMS Question

What is normalization?

Problem approach

Normalization is the process of reorganizing data in a database so that it meets two basic requirements:
1.There is no redundancy of data, all data is stored in only one place.
2.Data dependencies are logical, all related data items are stored together.
Normalization is important for many reasons, but chiefly because it allows databases to take up as little disk space as possible, resulting in increased performance.

03
Round
Easy
HR Round
Duration40 minutes
Interview date10 Nov 2015
Coding problem2

This was a HR round. The interviewer asked me a number of questions about myself and gave a puzzle as well to solve.

1. Basic HR Questions

1. Tell me about yourself
2. I was also asked many questions from my projects and resume. He asked number of persons involved in my projects and made note of it. Then asked “what is the difference b/w working as a team and working alone in projects.
3.If given the project, which you can do it alone and also u can take a team to work on it. what will u choose(team or doing alone)?and why?
4. If you are selected in SAP LABS and another company in chennai selecting you and giving you more salary than SAP, what will you do?
5. Your native is chennai, if you are selected you have to shift to bangalore? what u feel about it?

Problem approach

1. Speak clearly and vary your tone to show you’re interested and enthusiastic.
2. Take time to think about each question before answering so you can give a good response.
3. Give examples from your experience that demonstrate your knowledge and skills.

2. Puzzle

Four people need to cross a rickety bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person: 1 min, 2 mins, 7 mins and 10 mins. What is the shortest time needed for all four of them to cross the bridge and explain how?

 

Problem approach

General Tips : 
As the interviewer is looking to see how you think, rationalize and deal with complex problems, you should also explain your thought process so the interviewer can see the logic behind it.
As brainteaser questions are deliberately complex, it’s a good idea to practice them before the interview, to prepare you for the kind of questions you’re going to see.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by SAP Labs
2606 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by SAP Labs
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by SAP Labs
845 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 2 problems
Interviewed by SAP Labs
1728 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes