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

SDE - Intern

SAP Labs
upvote
share-icon
4 rounds | 11 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, OOPS, Computer Fundamentals, Operating System. DBMS, Computer Network
Tip
Tip

Tip 1 : Do good research about the company and recruiters. Research the company you are interviewing for thoroughly. Also, if you know your interviewer beforehand, follow on LinkedIn to know more about their work.

Tip 2 : Most of the HR questions didn’t require any preparation but the recollection of your past journey would be an excellent option because if you can co-relate the question asked in the interview to the real-life situation which has occurred before, there are decent chances of yours getting selected.

Tip 3 : Make a document where you can add answers to those questions which you think the interviewer can ask you about your resume. Like your introduction, Descriptions of your projects, Why do you want to join XYZ company, What are your strengths and weaknesses, etc

Application process
Where: Campus
Eligibility: 7.5+ CGPA
Resume Tip
Resume tip

Tip 1 : Do not lie on your resume or try to cheat in the interview. Write only those things in your resume that you are confident about.
Tip 2 : Add at least 2 mid-level projects and also add there GitHub link

Interview rounds

01
Round
Medium
Online Coding Interview
Duration45 Minutes
Interview date5 Sep 2021
Coding problem2

Online Test was scheduled on 5th Sept, 9:00 am. It was conducted on Talent Central (which is SHL's proctored platform). Around 200+ students have registered for the Online Test. The test duration was 45 minutes consisting of two coding questions.

1. Move All Negative Numbers To Beginning And Positive To End

Easy
10m average time
90% success
0/40
Asked in companies
BarclaysDunzoSAP Labs

You are given an array 'ARR' consisting of 'N' integers. You need to rearrange the array elements such that all negative numbers appear before all positive numbers.

Note:
The order of elements in the resulting array is not important.
Example:
Let the array be [1, 2, -3, 4, -4, -5]. On rearranging the array such that all negative numbers appear before all positive numbers we get the resulting array [-3, -5, -4, 2, 4, 1].
Problem approach

Step 1: Traverse the elements in the array one by one.
Step 2: For each element, check if the element is less than 0. If it is, then increment the count of negative elements.
Step 3: For each element, check if the element is greater than 0. If it is, then increment the count of positive elements.
Step 4: Print the count of negative and positive elements.

Try solving now

2. Occurrence of X in a Sorted Array

Moderate
26m average time
0/80
Asked in companies
DirectiSAP LabsAmazon

You have been given a sorted array/list of integers 'arr' of size 'n' and an integer 'x'.


Find the total number of occurrences of 'x' in the array/list.


Example:
Input: 'n' = 7, 'x' = 3
'arr' = [1, 1, 1, 2, 2, 3, 3]

Output: 2

Explanation: Total occurrences of '3' in the array 'arr' is 2.


Problem approach

Step 1: Use Binary search to get the index of the first occurrence of x in arr[]. Let the index of the first occurrence be i. 
Step 2: Use Binary search to get the index of the last occurrence of x in arr[]. Let the index of the last occurrence be j. 
Step 3: Return (j – i + 1);

Try solving now
02
Round
Medium
Video Call
Duration45 Minutes
Interview date8 Sep 2021
Coding problem3

Usually, SAP Labs asked questions mainly based on OOPS, DBMS, Low-Level Design using OOP, and Database Design using SQL Queries. But be prepared with all the CS Subjects because you never know what the interviewer will ask you during the interview.
Technical Round I was scheduled for 8th Sept, 9:30 am. It was conducted on Microsoft Teams.

1. Leftmost and rightmost nodes in a binary tree

Easy
20m average time
80% success
0/40
Asked in companies
Disney + HotstarOracleAdobe

You are given an arbitrary binary tree with N nodes, whose nodes have their values in the range of integers. You have to print the values of leftmost and rightmost nodes at each level of the given tree. In other words, for every level in the given tree, print the values of corner nodes.

Two nodes are said to be at the same level if they are at the same distance from the root node.

Note:

1. For all such levels where there is only one corner node the leftmost and the rightmost nodes are the same.
2. In the output, you have to print the leftmost and rightmost values in level order fashion i.e, the leftmost node of level1 followed by the rightmost node of level1 followed by the leftmost node of level2 followed by the rightmost node of level2 and so on.
Problem approach

1. Declare a queue to store a pointer to tree nodes;
2. Declare store=0 which will print the rightmost node;
3. Declare temp to store DeQueued element from queue ;
4. Declare count=0 which will help to print the leftmost node;
5. Print the root->data first
6. IF (root->left)
EnQueue (q,root->left);
IF (root->right)
EnQueue (q,root->right);
EnQueue (q, NULL); //to indicate end of first level (root only)
7. While(q is not empty){
temp=DeQueue(q);
Increment count;
//temp is not NULL && temp is pointer to the first node (leftmost)
IF(temp && count==1) 
Print temp->data;
ELSE IF(temp) //for other nodes rather than the leftmost one
store=temp->data; //update store each time with latest node value
END IF-ELSE
IF (temp==NULL) //end of previous level
IF (q is not empty)
EnQueue(q,NULL);
END IF
count=0; //re-define countas 0 for next level
Print store; //store consist of rightmost of last level node value
ELSE
IF(temp->left is not NULL)
EnQueue(q, temp->left);
IF(temp->right is not NULL)
EnQueue(q, temp->right);
END IF-ELSE
END WHILE
END FUNCTION

Try solving now

2. Reverse Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
WalmartHCL TechnologiesInfo Edge India (Naukri.com)

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

1) Divide the list into two parts - the first node and the rest of the linked list.
2) Call reverse for the rest of the linked list.
3) Link rest to first.
4) Fix head pointer

Try solving now

3. Operating System Question

What is the difference between process and threading?

Problem approach

Tip 1: For Operating System, I have used Love Babbar CheatSheet, InterviewBit, and Gate Smashers OS Playlist. You can also refer Sanchit Jain Playlist 
Tip 2: Try to answer exactly and with some example

03
Round
Medium
Video Call
Duration30 Minutes
Interview date8 Sep 2021
Coding problem3

Technical Round II was scheduled for 8th Sept, 11:45 am. It was conducted on Microsoft Teams.

1. DBMS Question

Make a database for the college system.

Problem approach

Tip 1: For DBMS, I have used Love Babbar CheatSheet, Tutorialspoint, and Javatpoint. 
Tip 2: You can also use Hackerrank for SQL query practice.

2. OOPS Question

What is operator overloading and overriding?

Problem approach

First I gave him a definition and then I gave him an example explaining the difference between operator overloading and overriding.

3. Technical Question

What are recursion and their types with code?

Problem approach

I only know three types of recursion and he was satisfied with them.

04
Round
Medium
HR Round
Duration15 Minutes
Interview date8 Sep 2021
Coding problem3

The HR round is to judge your personality, your strengths, your weaknesses, your capability to handle the role, to check your background, and to understand if you're the right fit for this job.
HR Round was scheduled for 8th Sept, 3:10 pm. It was conducted on Microsoft Teams.

1. Basic HR questions

Introduce yourself

Problem approach

Tip 1 : Try to add all the summaries of your resume in 2-3 lines.
Tip 2 : Tell something different than your resume.

2. Basic HR Question

Asked me about my schooling life

Problem approach

Tip 1 : So first I started with my primary school life and told her about all the achievements I have made during my schooling year, then I moved to my high school life and told her how I prepare for JEE and MHT CET.
Tip 2 : Try to prepare for such questions beforehand.

3. Basic HR Question

Why do you want to join SAP labs?

Problem approach

Tip 1 : Do good research about the company and recruiters. Research the company you are interviewing for thoroughly.
Tip 2 : Also, if you know your interviewer beforehand, follow on LinkedIn to know more about their work.

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by SAP Labs
2136 views
0 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 4 problems
Interviewed by SAP Labs
825 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by SAP Labs
899 views
0 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 8 problems
Interviewed by SAP Labs
1900 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes