Siemens Limited interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Siemens Limited
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I started my preparation in the early days of my college when I started practicing the leetcode and the code studio problems. In the end, I have done more than 300 questions on the leetcode platform.
Application story
I applied to this company throw the on-campus opportunity as my college is a tier 1 college this company always visit my college for hire.
Why selected/rejected for the role?
I was rejected because i was not able to explain all the concept with the correct accuracy.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Regarding DSA preparation, I have a theory. 20 percent of the questions will be asked in 80 percent of the interview and 80 percent of the questions will be asked in 20 percent of the interviews. In short, some questions have a very high chance of coming up during the interviews and some have very low chance. We should focus more on the questions that have more chance of coming up in the interview. You can find these questions on Striver SDE Sheet, InterviewBit, Leetcode 100 most liked, Leetcode 100 most important.

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

Tip 1 : Make Sure that your resume is simple and also try to fit all the information on only one page.
Tip 2 : Have at least 2 projects with the latest technologies, Github link of projects should be provided

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date23 Jun 2022
Coding problem3

1. Merge Sort

Easy
15m average time
85% success
0/40
Asked in companies
Media.netHewlett Packard EnterpriseIBM

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm -

Merge sort is a Divide and Conquer based Algorithm. It divides the input array into two-parts, until the size of the input array is not ‘1’. In the return part, it will merge two sorted arrays a return a whole merged sorted array.

subsequence

The above illustrates shows how merge sort works.
Note :
It is compulsory to use the ‘Merge Sort’ algorithm.
Problem approach

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Try solving now

2. LRU Cache Implementation

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

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You will be given ‘Q’ queries. Each query will belong to one of these two types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Problem approach

Tip 1 : You should have clear understanding of OS theoretical concepts.
Tip 2 : Provide real life examples for your answer.

Try solving now

3. Find Path

Hard
10m average time
90% success
0/120
Asked in companies
SamsungMorgan StanleyCoinbase

You are given a tree with 'N' nodes with 'N' - 1 distinct edge. You are also given two nodes 'N1' and 'N2'. You have to find and print the shortest path between 'N1' and 'N2'.

A tree data structure is a nonlinear hierarchical data structure that consists of nodes connected by edges.

Note

1. There is no cycle present in a tree.
2. All values in the tree are unique.
3. Both nodes will always exist in the tree.
Problem approach

You are given a tree with 'N' nodes with 'N' - 1 distinct edge. You are also given two nodes 'N1' and 'N2'. You have to find and print the shortest path between 'N1' and 'N2'.
A tree data structure is a nonlinear hierarchical data structure that consists of nodes connected by edges.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date23 Jun 2022
Coding problem2

1. Count Leaf Nodes

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

You are given a Binary tree. You have to count and return the number of leaf nodes present in it.

A binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child

A node is a leaf node if both left and right child nodes of it are NULL.

Problem approach

You are given a Binary tree. You have to count and return the number of leaf nodes present in it.
A binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child
A node is a leaf node if both left and right child nodes of it are NULL.

Try solving now

2. Shortest Path in a Binary Maze

Moderate
30m average time
75% success
0/80
Asked in companies
SamsungAmazonHSBC

Given a maze in the form of a binary rectangular matrix of size M*N, where each element can either be 0 or 1, the task is to find the length of the shortest path in a maze from a given source cell to a destination cell.

The path can only be created out of a cell if its value is 1 and at any given moment, we can only move one step in one of the four directions. The valid moves are:

Up: (x, y) -> (x - 1, y)
Left: (x, y) -> (x, y - 1)
Down: (x, y) -> (x + 1, y)
Right: (x, y) -> (x, y + 1)

If there is no path from a given source cell to a destination cell, return -1.

For example :
consider the binary matrix below. If source = (0, 0) and destination = (3, 4), the shortest path from source to destination has length 11.

example

Problem approach

Given a maze in the form of a binary rectangular matrix of size M*N, where each element can either be 0 or 1, the task is to find the length of the shortest path in a maze from a given source cell to a destination cell.

Try solving now

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - 1
1 rounds | 3 problems
Interviewed by Siemens Limited
2803 views
0 comments
0 upvotes
SDE - 1
4 rounds | 11 problems
Interviewed by Siemens Limited
1275 views
0 comments
0 upvotes
SDE - 1
3 rounds | 3 problems
Interviewed by Siemens Limited
0 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Siemens Limited
1860 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes