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

SDE - 2

SAP Labs
upvote
share-icon
5 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Data structures, Algorithms, OOPS, System Design, Competitive Programming
Tip
Tip

Tip 1 : Being consistent with coding is the key
Tip 2 : Try to solve company specific coding questions 
Tip 3 : In System Design ask questions

Application process
Where: Linkedin
Eligibility: No
Resume Tip
Resume tip

Tip 1 : Have a crisp and clear resume for specific roles
Tip 2 : Highlight all the major points in the resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date18 May 2021
Coding problem1

It was an online coding round can be given anytime anywhere.

1. Find prime numbers

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

You are given a positive integer ‘N’. Your task is to print all prime numbers less than or equal to N.

Note: A prime number is a natural number that is divisible only by 1 and itself. Example - 2, 3, 17, etc.

You can assume that the value of N will always be greater than 1. So, the answer will always exist.

Problem approach

Tip 1: Read arrays and time complexity 
Tip 2: Analysis of the problem is must before coding 

Try solving now
02
Round
Medium
Face to Face
Duration60 mins
Interview date31 May 2021
Coding problem2

It was a F2F round virtually, involving questions from Java, OPPS Data structures. not a coding round

1. Questions on Java lambda expression, filter queries

Using lambda expression find all the authors whose book is published by joining two tables

Problem approach

Tip 1: Learn Java 8
 

2. OOPS based questions

What is encapsulation.
Differences between checked and unchecked exception
What is garbage collection
What are maps and their internal working

03
Round
Hard
Face to Face
Duration60 mins
Interview date2 Jun 2021
Coding problem2

Coding round

1. Stack using queue

Moderate
25m average time
65% success
0/80
Asked in companies
AmazonQualcommPhilips

Implement a Stack Data Structure specifically to store integer data using two Queues.


There should be two data members, both being Queues to store the data internally. You may use the inbuilt Queue.


Implement the following public functions :

1. Constructor:
It initializes the data members(queues) as required.

2. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.

3. pop() :
It pops the element from the top of the stack and, in turn, returns the element being popped or deleted. In case the stack is empty, it returns -1.

4. top :
It returns the element being kept at the top of the stack. In case the stack is empty, it returns -1.

5. size() :
It returns the size of the stack at any given instance of time.

6. isEmpty() :
It returns a boolean value indicating whether the stack is empty or not.
Operations Performed on the Stack:
Query-1(Denoted by an integer 1): Pushes an integer data to the stack. (push function)

Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack and returns it to the caller. (pop function)

Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack but doesn't remove it, unlike the pop function. (top function)

Query-4(Denoted by an integer 4): Returns the current size of the stack. (size function)

Query-5(Denoted by an integer 5): Returns a boolean value denoting whether the stack is empty or not. (isEmpty function)
Example
Operations: 
1 5
1 10
2
3
4

Enqueue operation 1 5: We insert 5 at the back of the queue.
  Queue: [5]

Enqueue operation 1 10: We insert 10 at the back of the queue.
  Queue: [5, 10]

Dequeue operation 2: We remove the element from the front of the queue, which is 5, and print it.
  Output: 5
  Queue: [10]

Peek operation 3: We return the element present at the front of the queue, which is 10, without removing it.
  Output: 10
  Queue: [10]

IsEmpty operation 4: We check if the queue is empty.
  Output: False
  Queue: [10]
Problem approach

Tip 1: read stacks and queues 
Tip 2: don't directly jump to solving questions, discuss the approach with interviewer 

Try solving now

2. Distance between two nodes of a Tree

Moderate
25m average time
60% success
0/80
Asked in companies
PhilipsSAP LabsPhonePe

Given a binary tree and the value of two nodes, find the distance between the given two nodes of the Binary Tree.

Distance between two nodes is defined as the minimum number of edges in the path from one node to another.

Problem approach

Tip 1: Maintain the speed 
Tip 2: Discuss the approach with interviewer 

Try solving now
04
Round
Medium
Face to Face
Duration30 mins
Interview date5 Jun 2021
Coding problem1

This was mostly techno managerial round. Where questions related to previous projects were asked and their design

1. Project based questions

Pick any of your previous project and give their LLD and HLD

Problem approach

Tip 1: Go through System Design questions 
 

05
Round
Easy
HR Round
Duration30 mins
Interview date7 Jun 2021
Coding problem1

This was the HR round and also behavioural check round.

1. Basic HR Questions

Why do you want to leave the previous company
Any existing offer
Why do you want to join SAP
what are your salary expectations?

Problem approach

Tip 1: Be confident in this round 
Tip 2: Don't give any negative feedback

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
Senior Software Developer
4 rounds | 13 problems
Interviewed by SAP Labs
1865 views
0 comments
0 upvotes
company logo
Developer Associate
5 rounds | 8 problems
Interviewed by SAP Labs
2219 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by SAP Labs
8826 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by SAP Labs
1181 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29893 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6766 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5281 views
0 comments
0 upvotes