SAP Labs Interview Experience
On-Campus
Mohammed Mehdi Patel
B.Tech Comps VJTI 2022
SAP Labs visited our campus in August 2021 to hire final year students for the role of Associate Developer. Their criteria was:
CPI 7 and above
60% and above in 10th and 12th
Online test
The online test was conducted on the SHL Platform that internally opened Amcat. The test was for 45 mins. There were 2 coding questions and both were easy:
You are given an array consisting of positive and negative integers. These integers are requests sent to a server(s). A positive integer means allocation and a negative integer means deallocation. There are two servers, server 1 and server 2. For load balancing purposes, the 1st request is sent to server 1, the 2nd to server 2, the 3rd to server 1, the 4th to server 2 and so on. You have to calculate the sum of the allocations and deallocations of requests received at server 1.
Eg: [-2 4 6 -3 8 9]
Output: 12
The requests received by server 1 are -2, 6 and 8. Since -2+6+8=12, the output should be 12.
You are given an integer N(number of elements in an array), an integer K and N space separated integers(the array). You have to find the no. of elements strictly less than K.
Eg: 5 7
3 8 5 21 4
Output: 3
Numbers strictly less than K are 3,5 and 4. Hence, the output is 3.
I was shortlisted for the interview and there were 4 rounds. The interview was conducted on Microsoft Teams.
Technical Round 1
I was first asked to introduce myself. Then the interviewer asked me some questions on OOP:
Explain the concept of OOP with an example
Explain Polymorphism and Abstraction with examples.
What if I make a class final? Can another class inherit a final class?
Can I declare an abstract class final?
Then the interviewer asked me some coding questions:
Reverse an array. I gave 2 answers. One using an extra array and the other using two pointers.
Reverse a linked list
The interviewer then asked me 2 sql queries:
Given two tables:
employee(id, name, dept_id, manager_id)
manager(id, manager_name)
Display the data of all the employees along with their manager name.
Given two tables:
employee(id, name, dept_id, salary)
department(id, dept_name)
Display the sum of salaries of all the employees grouped by the departments. In the output, there should be 2 columns. One showing the sum of the salaries and the other showing the department name.
We then had a discussion on one of my projects.
Technical Round 2
The interviewer introduced himself and asked me the following questions:
How would you rate the 1st round: easy, medium or hard?
What language are you comfortable with for coding questions, C++ or Java? I said C++.
Have you done competitive programming on codechef, codeforces or any other platform? Since I had never done CP on any of the platforms, I said no. But I also said that I had practiced a lot of problems on Geeks for Geeks and Leetcode.
Then he asked me a coding question:
Given an input stream arr[] of n integers. Find the Kth largest element for each element in the stream and if the Kth element doesn't exist, return -1.
Example 1:
Input:
k = 4, n = 6
arr[] = {1, 2, 3, 4, 5, 6}
Output:
-1 -1 -1 1 2 3
Explanation:
k = 4
For 1, the 4th largest element doesn't
exist so we print -1.
For 2, the 4th largest element doesn't
exist so we print -1.
For 3, the 4th largest element doesn't
exist so we print -1.
For 4, the 4th largest element is 1.
For 5, the 4th largest element is 2.
for 6, the 4th largest element is 3.
Note
Here, you are not given the whole array from before. You are given a stream of inputs. So everytime the user enters a number, you find the kth largest number at that point itself. If the kth largest number does not exist then print -1 otherwise print the kth largest number. Once you calculate the kth largest number, add it to an array, vector or whatever you want to use to keep track of all the inputs you have received.
The input will not necessarily be sorted.
I initially answered the question using a set. But I realized that a set will only have unique values. Since the interviewer told me that my answer should also handle duplicate values, I used a priority queue(min heap) and solved the question.
Write the code for implementation of priority queue(since I had solved the coding question using a priority queue).
Do you know Java and have you done any projects in Java(I had not done any project in Java but I knew the basics)
Difference between interface and abstract class.
Can we achieve multiple inheritance in Java? If yes, then how?
Why do you think Java does not support multiple inheritance with classes?
Have you heard of cloud computing?
In this round the interviewer did not see if you can solve the coding question completely, rather he just wanted to see how I think and my way of approaching a problem. Always tell the interviewer what you are thinking. He wants to know what is going on in your mind. The interviewer also helped me a little bit by giving some hints.
Managerial Round
Introduce yourself
What do you know about SAP?
Do you have any plans for higher studies?
What can you bring to SAP with your skills?
An in-depth discussion of the projects that I had done.
Was Shrike(one of my projects) for increasing your personal knowledge or you actually wanted to make something better than skype and publish it to the play store/app store. The interviewer asked this question since Shrike is a social networking app similar to skype. I had done this project to increase my personal knowledge.
Any questions that you want to ask?
HR Round
The interviewer introduced herself and then she asked me to introduce myself. She then asked me if I could give any feedback related to their testing platform(SHL testing platform), their Pre-Placement Talk and the interview process.
Describe your hackathon experience(I had mentioned two hackathons in my resume. She told me to describe the experience of any one of them)
Since I was the team leader in both the hackathons, I was asked about good leadership qualities.
How did your perspective about leadership change after the hackathon?
How would you lead a team where most of your team members are in their 30s and 40s and are very experienced?
Why Engineering?
Any questions that you have for me?
4 out 6 students who made it to the last round were given a Full Time Offer and I was one of them.
Some Helpful Tips
NEVER FORGET TO RESEARCH ABOUT THE COMPANY. The interviewer would most probably ask you about the company’s mission, vision, values or what it does.
DO NOT LIE IN YOUR RESUME, they ask questions from it, so it is important to know everything you’ve written in your resume.
Don’t forget to prepare yourself for behavioral questions. Sometimes, we focus a lot on technical questions and completely ignore behavioral questions.
Have a look at some interview experiences before the interview. You can find a lot of interview experiences on Geeks for Geeks. This really helps in the interview.
Don’t lose hope, even though you feel that you could not perform the way you wanted to. Stay calm and composed during the interview.
Remember that your body language says as much about you as your answers to the questions.
Best of luck! 👍👍