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

SDE - 1

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: DSA(Data Structures and Algorithms),Object-Oriented Programming Principles,Operating Systems,Database Management Systems,Web Development,Machine Learning,Projects(Internship/Full-time)
Tip
Tip

Tip 1 : Prepare DSA well. Standard Leetcode-type questions will be asked.
Tip 2 : You should be crystal clear about your project/s as any question would be asked and you should be able to answer it.
Tip 3 : Prepare CS fundaments like OS, OOPs, DBMS, etc.

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

Tip 1 : Clearly mention the tech. stack you have worked on in the project/s
Tip 2 : As a fresher, you should add your coding profiles on CodeChef, Codeforces, etc. so as to make the resume shortlisting easy

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date21 Nov 2019
Coding problem3

1. Longest Increasing Subsequence

Moderate
0/80
Asked in companies
GrabAmazonSamsung

'N' students are standing in a row. You are given the height of every student standing in the row. Your task is to find the longest strictly increasing subsequence of heights from the row such that the relative order of the students does not change.

A subsequence is a sequence that can be derived from another sequence by deleting zero or more elements without changing the order of the remaining elements.
Problem approach

This is a variation of the standard LIS and LCS problem.

Try solving now

2. Overlapping Intervals

Easy
24m average time
0/40
Asked in companies
SprinklrAdobeAmazon

You have been given the start and end times of 'N' intervals. Write a function to check if any two intervals overlap with each other.

Note :
If an interval ends at time T and another interval starts at the same time, they are not considered overlapping intervals.
Problem approach

It's the standard interval scheduling problem.

Try solving now

3. DBMS Question

SQL queries were asked

Problem approach

Tip 1 : Practice SQL queries

02
Round
Medium
Face to Face
Duration60 Minutes
Interview date26 Nov 2019
Coding problem2

1. Zig-Zag String

Easy
15m average time
85% success
0/40
Asked in companies
FacebookAppleOYO

You are given a string ‘STR’ of size ‘N’ and an integer ‘M’ (the number of rows in the zig-zag pattern of ‘STR’). Your task is to return the string formed by concatenating all ‘M’ rows when string ‘STR’ is written in a row-wise zig-zag pattern.

Example:
N = 12, M = 3 and STR = ‘CODINGNINJAS’

example

There are three rows (‘M = 3’) in the zig-zag pattern. Row one contains ‘CNN’, row two contains ‘OIGIJS’, and row three contains ‘DNA’. After concatenating the three rows, we get the string ‘CNNOIGIJSDNA’. So, the answer is ‘CNNOIGIJSDNA’.
Note:
1. The string ‘STR’ consists of capital letters only (i.e., characters from ‘A-Z’).
Problem approach

I wasn't able to tell the approach directly to the interviewer.
He gave me some hint.
Then, I created r strings where r was the number of rows and added the required character into the particular string while traversing the main string

Try solving now

2. Next Permutation

Moderate
15m average time
85% success
0/80
Asked in companies
UberAdobeCultfit

You have been given a permutation of ‘N’ integers. A sequence of ‘N’ integers is called a permutation if it contains all integers from 1 to ‘N’ exactly once. Your task is to rearrange the numbers and generate the lexicographically next greater permutation.

To determine which of the two permutations is lexicographically smaller, we compare their first elements of both permutations. If they are equal — compare the second, and so on. If we have two permutations X and Y, then X is lexicographically smaller if X[i] < Y[i], where ‘i’ is the first index in which the permutations X and Y differ.

For example, [2, 1, 3, 4] is lexicographically smaller than [2, 1, 4, 3].

Problem approach

It's a three-step problem.
Step 1: Start from the end of the string and find the first index i where the element is less than the next element.
Step 2: Swap the element at this index i with the first element greater than this element after the index i
Step 3: Reverse the substring after index i.

Try solving now
03
Round
Medium
Face to Face
Duration60 Minutes
Interview date26 Nov 2019
Coding problem2

1. Remove Duplicates

Easy
0/40
Asked in companies
CIS - Cyber InfrastructureSAP LabsAdobe

Given a string S, remove consecutive duplicates from it recursively.

Problem approach

Traverse the array and replace the duplicates with the unique elements in it.

Try solving now
Easy
30m average time
80% success
0/40
Asked in companies
AdobeOlaWalmart

You are given an input string 'S'. Your task is to find and return all possible permutations of the input string.

Note:
1. The input string may contain the same characters, so there will also be the same permutations.

2. The order of permutation does not matter.
Problem approach

Wrote two different functions to explain the same, permutations using backtracking and subsets using bit masking

Try solving now
04
Round
Medium
Face to Face
Duration60 Minutes
Interview date26 Nov 2019
Coding problem2

1. System Design Question

Design an e-commerce website like Flipkart/Amazon

Problem approach

Tip 1 : Start with the features you're going to implement in the system
Tip 2 : Create an ER diagram representing the same
Tip 3 : Divide the system into different tiers like web tier, database tier, etc., and explain each one

2. Operating System Questions

Questions about race condition, semaphore, mutex, etc.
Was asked to explain the Reader-Writer problem and write its code.
Also, was asked to explain the conflicts which can happen in this scenario

Problem approach

Tip 1 : Explain the answers by citing some good examples
Tip 2 : Write clean and clear code

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 - 1
3 rounds | 3 problems
Interviewed by SAP Labs
2656 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
867 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 2 problems
Interviewed by SAP Labs
1752 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes