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

Associate Developer

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

Interview preparation journey

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

Tip 1 : Practise coding problems daily, consistency is the key.
Tip 2 : Be confident when answering questions in an interview. Attitude and confidence play a big part in hiring.
Tip 3 : Prepare your fundamentals first.

Application process
Where: Company Website
Eligibility: Depends on the job requirement.
Resume Tip
Resume tip

Tip 1 : Keep it brief and concise.
Tip 2 : List your most recent experiences first.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date15 Aug 2020
Coding problem2

It was an online coding round hiring team shared the contest link. The round lasted for 1.5 hours. Additionally, it has two coding questions—one medium and the other hard. And there were 20 MCQs on basic aptitude, computer networking, and operating systems.

1. Maximum Product Subarray

Moderate
25m average time
75% success
0/80
Asked in companies
InnovaccerAmazonMicrosoft

You are given an array “arr'' of integers. Your task is to find the contiguous subarray within the array which has the largest product of its elements. You have to report this maximum product.

An array c is a subarray of array d if c can be obtained from d by deletion of several elements from the beginning and several elements from the end.

For e.g.- The non-empty subarrays of an array [1,2,3] will be- [1],[2],[3],[1,2],[2,3],[1,2,3]. 
For Example:
If arr = {-3,4,5}.
All the possible non-empty contiguous subarrays of “arr” are {-3}, {4}, {5}, {-3,4}, {4,5} and {-3,4,5}.
The product of these subarrays are -3, 4, 5, -12, 20 and -60 respectively.
The maximum product is 20. Hence, the answer is 20.
Follow Up:
Can you solve this in linear time and constant space complexity?
Problem approach

The answer would unquestionably be the sum of the values in the entire array if there were no zeros or negative numbers.

Let's now assume there were only positive numbers, 0 (zero), and no negative numbers. Then, if 0s were encountered, we could maintain a current maximum product, which would be reset to A[i].
The situation slightly alters when the negative numbers are used. The maximum product in the positive and the maximum product in the negative must now be maintained. The maximum product in negative can be seen immediately when a negative number is encountered.

Try solving now

2. All Prime Numbers less than or equal to N

Moderate
10m average time
90% success
0/80
Asked in companies
OptumIBMAmazon

You are given a positive integer 'N'. Your task is to return all the prime numbers less than or equal to the 'N'.

Note:

1) A prime number is a number that has only two factors: 1 and the number itself.

2) 1 is not a prime number.
Problem approach

Algorithm based approach - Sieve of Eratosthenes. The time complexity is O(N * loglog(N))

Try solving now
02
Round
Medium
Face to Face
Duration60 Minutes
Interview date20 Aug 2020
Coding problem3

There were two interviewers present for the interview round. OOPS concepts and problem solving were tested. The round lasted approximately one hour. There were also some project-related questions.

1. Leap Year

Easy
15m average time
80% success
0/40
Asked in companies
SAP LabsCuemath

You are given a year in the form of an integer 'N', and your task is to check whether the given year is a leap year or not.

Note:

1) A year is said to be a leap year if it has 366 days. Normal years have 365 days.

2) The integer 'N' does not contain any leading zeros.
Problem approach

A leap year satisfies the following conditions:
The year is multiple of 400.
The year is multiple of 4 and not multiple of 100.

Try solving now

2. Zigzag Binary Tree Traversal

Easy
10m average time
90% success
0/40
Asked in companies
AmazonGoldman SachsFlexiEle Consulting Services (FE)

You are given a ‘Binary Tree’.


Return the level-order traversal of the Binary Tree.


Example:
Input: Consider the following Binary Tree:

Example

Output: 
Following is the level-order traversal of the given Binary Tree: [1, 2, 3, 5, 6, 4]


Problem approach

The approach I used was very similar to the level order traversal.Added an extra parameter to keep a track of each level in left-right or right-left way.

Try solving now

3. Reverse String

Moderate
0/80
Asked in companies
Livekeeping (An IndiaMART Company)IBMMcAfee

You are given a string ‘S’. You are also given ‘M’ integers in an array ‘A’. You perform ‘M’ operations on this string. The operations are given in an array ‘A’ of size ‘M’.

You perform the operations in the order they appear in the array ‘A’. In the ‘i’th operation, you reverse the substring of ‘S’ from the position ‘A[i]’ to ‘len(S)’ - ‘A[i]’ - 1 (0 based).

Your task is to find the string after performing all the operations.

Example :
‘S’ = “aabcd”, ‘M’ = 2, ‘A’ = [0, 1]
After 1st operation i.e, reversing from [0, 4], ‘S’ = “dcbaa”.
After 2nd operation i.e, reversing from [1, 3], ‘S’ = “dabca”.
Hence, the answer is “dabca”.
Problem approach

Used simple iteration to solve these questions. While reversing a string iterate till half of the string length.

Try solving now
03
Round
Easy
HR Round
Duration45 minutes
Interview date30 Aug 2020
Coding problem1

It was a discussion based round. There were behavioural questions. There were also some mathematical and aptitude questions. There were some questions about SAP, its products and offerings. This round was more like a one-on-one conversation.

1. Basic HR questions

Some mathematical and aptitude questions. Behavioural questions: what are your strength and weakness, about leadership skills. General questions about SAP. Project discussion.

Problem approach

Tip 1 : Be confident.
Tip 2 : Give honest responses rather than ones you've prepared in advance.

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
Associate Developer
3 rounds | 2 problems
Interviewed by SAP Labs
2090 views
0 comments
0 upvotes
company logo
Associate Developer
4 rounds | 7 problems
Interviewed by SAP Labs
1620 views
0 comments
0 upvotes
company logo
Associate Developer
4 rounds | 7 problems
Interviewed by SAP Labs
1130 views
0 comments
0 upvotes
company logo
Associate Developer
5 rounds | 11 problems
Interviewed by SAP Labs
2503 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Associate Developer
3 rounds | 5 problems
Interviewed by Oracle
1455 views
0 comments
0 upvotes