Robert Bosch Engineering and Business Solutions Vietnam interview experience Real time questions & tips from candidates to crack your interview

Associate Software Engineer

Robert Bosch Engineering and Business Solutions Vietnam
upvote
share-icon
3 rounds | 14 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Algorithms, Computer Networks, Operating System, Software Design Patterns, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

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

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Video Call
Duration60 Minutes
Interview date21 Dec 2021
Coding problem7

This round started with a coding questions in which I was expected to first explain my approach and then code the solution. This was followed by some more questions from Operating System and Computer Networks.

1. Minimum number of swaps required to sort an array

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

You have been given an array 'ARR' of 'N' distinct elements.

Your task is to find the minimum no. of swaps required to sort the array.

For example:
For the given input array [4, 3, 2, 1], the minimum no. of swaps required to sort the array is 2, i.e. swap index 0 with 3 and 1 with 2 to form the sorted array [1, 2, 3, 4].
Problem approach

Approach :

1) The basic idea is to make a new array (called temp), which is a sorted form of the input array.

2) Make a map that stores the elements and their corresponding index, of the input array. So at each i starting from 0
to N is in the given array, where N is the size of the array:

3) If i is not in its correct position according to the sorted array, then

4) We will fill this position with the correct element from the hashmap we built earlier. We know the correct element
which should come here is temp[i], so we look up the index of this element from the hashmap.

5) After swapping the required elements, we update the content of the hashmap accordingly, as temp[i] to the ith
position, and arr[i] to where temp[i] was earlier.


TC : O(N * Log(N)), where N=size of the given array.
SC : O(N)

Try solving now

2. OS Question

Print 1 to 100 using more than two threads(optimized approach).

Problem approach

Prerequisite to solve this problem : Multithreading

The idea is to create two threads and print even numbers with one thread and odd numbers with another thread.

Below are the steps:

1) Create two threads T1 and T2 , where T1 and T2 are used to print odd and even numbers respectively.

2) Maintain a global counter variable and start both threads.

3) If the counter is even in the Thread T1, then wait for the thread T2 to print that even number. Otherwise, print that
odd number, increment the counter and notify to the Thread T2 .

4)If the counter is odd in the Thread T2, then wait for the thread T1 to print that even number. Otherwise, print that
even number, increment the counter and notify the Thread T1.

3. OS Question

Difference between Process and Program

Problem approach

Process : A Process is an execution of a specific program. It is an active entity that actions the purpose of the
application. Multiple processes may be related to the same program. For example, if we double-click on Google
Chrome browser, we start a process that runs Google Chrome and when we open another instance of Chrome, we
essentially create a second process.


Program : A Program is an executable file which contains a certain set of instructions written to complete the specific
job or operation on your computer. For example, Google browser chrome.exe is an executable file which stores a set
of instructions written in it which allows us to open the browser and explore web pages.


Major Differences b/w Process and Program :

1) Process is an executing part of a program whereas a program is a group of ordered operations to achieve a
programming goal.

2) The process has a shorter and minimal lifespan whereas program has a longer lifespan.

3) Process contains many resources like a memory address, disk, printer while Program needs memory space on the
disk to store all instructions.

4) When we distinguish between process and program, Process is a dynamic or active entity whereas Program is a
passive or static entity.

5) To differentiate program and process, Process has considerable overhead whereas Program has no significant
overhead cost.

4. OS Question

Difference between Process and Thread

Problem approach

Process : A process is the execution of a program that allows us to perform the appropriate actions specified in a
program. It can be defined as an execution unit where a program runs. The OS helps us to create, schedule, and
terminates the processes which is used by CPU. The other processes created by the main process are called child
process.


Thread : Thread is an execution unit that is part of a process. A process can have multiple threads, all executing at
the same time. It is a unit of execution in concurrent programming. A thread is lightweight and can be managed
independently by a scheduler. It helps us to improve the application performance using parallelism.

Major Differences b/w Process and Thread :

1) Process means a program is in execution, whereas thread means a segment of a process.
2) A Process is not Lightweight, whereas Threads are Lightweight.
3) A Process takes more time to terminate, and the thread takes less time to terminate.
4) Process takes more time for creation, whereas Thread takes less time for creation.
5) Process likely takes more time for context switching whereas as Threads takes less time for context switching.
6) A Process is mostly isolated, whereas Threads share memory.
7) Process does not share data, and Threads share data with each other.

5. Computer Networks Question

Describe the OSI Reference Model

Problem approach

Open System Interconnections (OSI) is a network architecture model based on the ISO standards. It is called the OSI
model as it deals with connecting the systems that are open for communication with other systems.

The OSI model has seven layers. The principles used to arrive at the seven layers can be summarized briefly as
below : 

1) Create a new layer if a different abstraction is needed.
2) Each layer should have a well-defined function.
3) The function of each layer is chosen based on internationally standardized protocols.

6. Computer Networks Question

What is the use of a router and how is it different from a gateway?

Problem approach

The router is a networking device used for connecting two or more network segments. It directs the traffic in the
network. It transfers information and data like web pages, emails, images, videos, etc. from source to destination in
the form of packets. It operates at the network layer. The gateways are also used to route and regulate the network
traffic but, they can also send data between two dissimilar networks while a router can only send data to similar
networks.

7. Computer Networks Question

Explain TCP/IP Model

Problem approach

The most widely used and available protocol is TCP/IP i.e. Transmission Control Protocol and Internet Protocol. TCP/IP specifies how data should be packaged, transmitted and routed in their end to end data communication.

Given below is a brief explanation of each layer : 

1) Application Layer: This is the top layer in the TCP/IP model. It includes processes that use the Transport Layer Protocol to transmit the data to their destination. There are different Application Layer Protocols such as HTTP, FTP, SMTP, SNMP protocols, etc.


2) Transport Layer: It receives the data from the Application Layer which is above the Transport Layer. It acts as a backbone between the host’s system connected with each other and it mainly concerns about the transmission of data. TCP and UDP are mainly used as Transport Layer protocols.


3) Network or Internet Layer: This layer sends the packets across the network. Packets mainly contain source & destination IP addresses and actual data to be transmitted.


4) Network Interface Layer: It is the lowest layer of the TCP/IP model. It transfers the packets between different hosts. It includes encapsulation of IP packets into frames, mapping IP addresses to physical hardware devices, etc.

02
Round
Medium
Video Call
Duration60 Minutes
Interview date21 Dec 2021
Coding problem5

This round had 2 coding questions followed by some questions from OOPS and Java.

1. Spiral Order Traversal of a Binary Tree

Easy
20m average time
75% success
0/40
Asked in companies
SliceOYOMicrosoft

You have been given a binary tree of 'N' nodes. Print the Spiral Order traversal of this binary tree.

For example
For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
    1
   / \
  2   3
     / \
    4   5

Output: 1 3 2 4 5
Problem approach

Approach :

1) We will maintain two stacks, one for each direction i.e. leftToRight and rightToleft.

2) We will do a level order traversal of the given binary tree and push nodes of each level onto one of the stack
according to the current direction of traversal.

3) After we’ve pushed all nodes of a level onto one stack, we’ll start popping those nodes. While popping the nodes
we will push their children (if any) onto our other direction stack, so that the next level be traversed in reverse order.


TC : O(N), where ‘N’ is the number of nodes in the binary tree.
SC : O(N)

Try solving now

2. Two Sum

Moderate
0/80
Asked in companies
Robert Bosch Engineering and Business Solutions VietnamCredit SuisseQuest Global Pvt. Services Ltd

Given an array ‘A’ of size ‘N’, sorted in non-decreasing order. Return the pair of two distinct indices whose value adds up to the given ‘target’. The given array is 0 indexed. So returned indices are in the range [0, N-1], both inclusive. If there are multiple answers, you can return any.

For example:
Suppose ‘N’ = 5, ‘A’ = [1,2,3,4,5], and target = 8
As target == A[2] + A[4] = 3 + 5 = 8.
Hence output will be 2 4.
Problem approach

Approach :

1) We can store the frequency of every element in the array in a hashmap.

2) We will loop over every index i, and check the frequency of (Target - ARR[i]) is the hashmap:
2.1) If (Target - ARR[i]) is equal to ARR[i], we will check if frequency of ARR[i] . If it is greater than 1 then we will
decrease the frequency of ARR[i] by 2 and add a pair (ARR[i] , ARR[i]) to our answer.

2.2) Else, if the frequency of ARR[i] and Target - ARR[i] is greater than equal to 1 then we add pair (ARR[i], Target -
ARR[i]) to our answer and decrease the frequency of both by 1.

3) If no valid pairs exist, we will return [[-1,-1]].


TC : O(N), where N=size of the array
SC : O(N)

Try solving now

3. OOPS Question

What do you mean by data encapsulation?

Problem approach

1) Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviors in
a single unit.

2) It helps developers to follow modularity while developing software by ensuring that each object is independent of
other objects by having its own methods, attributes, and functionalities.

3) It is used for the security of the private properties of an object and hence serves the purpose of data hiding.

4. OOPS Question

Explain Singleton Class in Java

Problem approach

1) In object-oriented programming, a singleton class is a class that can have only one object (an instance of the
class) at a time.

2) After first time, if we try to instantiate the Singleton class, the new variable also points to the first instance created.

3) So whatever modifications we do to any variable inside the class through any instance, it affects the variable of the
single instance created and is visible if we access that variable through any variable of that class type defined.

The key points while defining class as singleton class are :

1) Make constructor private.
2) Write a static method that has return type object of this singleton class. Here, the concept of Lazy initialization is
used to write this static method.

5. Java Question

What is Garbage collector in JAVA?

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.

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.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date21 Dec 2021
Coding problem2

This was a typical HR round with some standard Behavioral questions.

1. Basic HR Question

Tell me something about yourself?

Problem approach

Tip 1 : Prepare the points that you will speak in your introduction prior to the interview.
Tip 2 : Tell about your current cgpa, achievements and authenticated certification
Tip 3 : I told about my role in current internship and what all I do

2. Basic HR Question

Why should we hire you ?

Problem approach

Tip 1 : The cross questioning can go intense some time, think before you speak.

Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.

Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round,
like what are the projects currently the company is investing, which team you are mentoring. How all is the work
environment etc.

Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical
questions. No coding in most of the cases but some discussions over the design can surely happen.

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
company logo
Associate Software Engineer
3 rounds | 11 problems
Interviewed by Robert Bosch Engineering and Business Solutions Vietnam
1651 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Associate Software Engineer
3 rounds | 10 problems
Interviewed by Amdocs
2370 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 2 problems
Interviewed by Ernst & Young (EY)
2671 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 15 problems
Interviewed by Ernst & Young (EY)
2347 views
0 comments
0 upvotes