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

EDG-Intern

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures and Algorithms, Object-Oriented Programming System, Operating system, Database Management System
Tip
Tip

Try to do Data Structures and Algorithms based questions and firstly attempt it yourself before going to the solution, also try to do it as quickly as you can. Also prepare for theory subjects like Operating system, Database Management System, etc which I prepared through Coding Ninjas subjective notes and they are very accurate and up to mark.

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

Keep your resume simple and complete. Mention some good level projects, your previous experiences and coding achievements if any.

Interview rounds

01
Round
Easy
Video Call
Duration45 minutes
Interview date3 Nov 2021
Coding problem2

1. Count Inversions

Moderate
40m average time
55% success
0/80
Asked in companies
Hewlett Packard EnterpriseBNY MellonGrab

For a given integer array/list 'ARR' of size 'N' containing all distinct values, find the total number of 'Inversions' that may exist.

An inversion is defined for a pair of integers in the array/list when the following two conditions are met.

A pair ('ARR[i]', 'ARR[j]') is said to be an inversion when:

1. 'ARR[i] > 'ARR[j]' 
2. 'i' < 'j'

Where 'i' and 'j' denote the indices ranging from [0, 'N').
Problem approach

For a given integer array/list 'ARR' of size 'N' containing all distinct values, find the total number of 'Inversions' that may exist.
An inversion is defined for a pair of integers in the array/list when the following two conditions are met.
A pair ('ARR[i]', 'ARR[j]') is said to be an inversion when:

1. 'ARR[i] > 'ARR[j]' 
2. 'i' < 'j'

Where 'i' and 'j' denote the indices ranging from [0, 'N').

Try solving now

2. Theory Questions

  • What is Garbage collector in JAVA?
  • What is meant by exception handling?
Problem approach
  • 1) Garbage Collection in Java is a process by which the programs perform memory management automatically.

    2) The Garbage Collector(GC) finds the unused objects and deletes them to reclaim the memory. I

    3) In Java, dynamic memory allocation of objects is achieved using the new operator that uses some memory and the
    memory remains allocated until there are references for the use of the object.

    4) When there are no references to an object, it is assumed to be no longer needed, and the memory, occupied by
    the object can be reclaimed.

    5) There is no explicit need to destroy an object as Java handles the de-allocation automatically.
    The technique that accomplishes this is known as Garbage Collection. Programs that do not de-allocate memory can
    eventually crash when there is no memory left in the system to allocate. These programs are said to have memory
    leaks.

    Garbage collection in Java happens automatically during the lifetime of the program, eliminating the need to de-
    allocate memory and thereby avoiding memory leaks.

    In C language, it is the programmer’s responsibility to de-allocate memory allocated dynamically using free()
    function.This is where Java memory management leads.
  • No one wants its software to fail or crash. Exceptions are the major reason for software failure. The exceptions can be handled in the program beforehand and prevent the execution from stopping. This is known as exception handling.
    So exception handling is the mechanism for identifying the undesirable states that the program can reach and specifying the desirable outcomes of such states.
    Try-catch is the most common method used for handling exceptions in the program.
02
Round
Easy
Video Call
Duration45 minutes
Interview date3 Nov 2021
Coding problem2

1. Middle Of Linked List

Easy
20m average time
80% success
0/40
Asked in companies
SamsungGoldman SachsOracle

Given a singly linked list of 'N' nodes. The objective is to determine the middle node of a singly linked list. However, if the list has an even number of nodes, we return the second middle node.

Note:
1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Problem approach

Given the head node of the singly linked list, return a pointer pointing to the middle of the linked list.
If there are an odd number of elements, return the middle element if there are even elements return the one which is farther from the head node.
For example, let the linked list be 1->2->3->4->null

Since the number of elements in this linked list is 4 so we have 2 middle elements, i.e. 2 and 3, but we return 3 as it is farther from the head node, i.e. 1.

Try solving now

2. Remove character

Easy
0/40
Asked in companies
Hewlett Packard EnterpriseLivekeeping (An IndiaMART Company)Credit Suisse

For a given a string(str) and a character X, write a function to remove all the occurrences of X from the given string.

The input string will remain unchanged if the given character(X) doesn't exist in the input string.

Problem approach

For a given string(str) and a character X, write a function to remove all the occurrences of X from the given string and return it.
The input string will remain unchanged if the given character(X) doesn't exist in the input string.

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

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
Deep Learning Research Intern
3 rounds | 4 problems
Interviewed by Siemens Limited
969 views
0 comments
0 upvotes
SDE - 1
4 rounds | 11 problems
Interviewed by Siemens Limited
1305 views
0 comments
0 upvotes
Technical Analyst-Intern
2 rounds | 3 problems
Interviewed by Siemens Limited
0 views
0 comments
0 upvotes
Graduate Engineer Trainee
1 rounds | 3 problems
Interviewed by Siemens Limited
4577 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
EDG-Intern
3 rounds | 4 problems
Interviewed by Mathworks
820 views
0 comments
0 upvotes