HCL Technologies interview experience Real time questions & tips from candidates to crack your interview

System Engineer

HCL Technologies
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
I was not exceptionally good at coding at the start, but then I solved more than 400 questions on CodeStudio. Now, I can crack most of the interviews I attend.
Application story
Company organizes a nationwide test for the selection, i have applied on the company website for the same.
Why selected/rejected for the role?
I was rejected because i do not have good projects in my resume and do not have that much good knowledge of the Data structure and Algorithm.
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
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.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility:
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
Medium
Face to Face
Duration60 minutes
Interview date11 Mar 2023
Coding problem3

1. Count of Smaller Elements

Hard
45m average time
55% success
0/120
Asked in companies
AppleOYOAdobe

Given an array of size 'N' return the count array such that COUNT[i] equals the number of element which are smaller than ARR[ i ] on its the right side.

For Example : ARR = [4,2,1,5] the count array corresponding to the given array is :-.

The Number of elements smaller than 4 on its right side is 2.
The Number of elements smaller than 2 on its right side is 1.
The Number of elements smaller than 1 on its right side is 0.
The Number of elements smaller than 5 on its right side is 0.
Hence the count array is [2,1,0,0]
Try solving now

2. OS Questions

What is critical section? (Learn)
How does mutex work? (Learn)

Problem approach

A critical section refers to a specific portion of code or a region in a program where shared resources are accessed or modified. It is a section that must be executed atomically, meaning that only one thread or process should be allowed to access it at any given time to avoid race conditions and ensure data integrity.

A mutex (short for mutual exclusion) is a synchronization mechanism used to protect critical sections in concurrent programming. It allows multiple threads or processes to safely access shared resources by ensuring that only one thread or process can enter the critical section at a time.

3. OS Questions

How does semaphores work and how it is implemented? (Learn)
Binary vs counting semaphores.
Difference betweek mutex and binary semaphore. (Learn)

Problem approach

Semaphores are synchronization primitives used to control access to shared resources in a concurrent system. They help manage the execution order of multiple threads or processes to prevent race conditions and ensure proper synchronization. Semaphores maintain a count that can be incremented or decremented by threads or processes to control resource access.

Here's a high-level explanation of how semaphores work:

Initialization: A semaphore is created and initialized with an initial value. This value represents the number of available resources.

Acquiring (Wait): When a thread or process wants to access a shared resource, it attempts to acquire the semaphore. If the semaphore's count is greater than zero, it decrements the count and proceeds. Otherwise, if the count is zero, the thread or process is blocked until the count becomes greater than zero.

Releasing (Signal): When a thread or process finishes using a shared resource, it releases the semaphore by incrementing the count. This allows other threads or processes waiting on the semaphore to proceed.

Binary Semaphores: Binary semaphores are a specific type of semaphore where the count can only be either 0 or 1. They are often used for mutual exclusion purposes, such as ensuring only one thread or process can access a critical section at a time. Binary semaphores can be seen as a simplified version of mutexes.

Counting Semaphores: Counting semaphores, also known as general semaphores, have a count that can be any non-negative integer. They are used to control access to a pool of resources. Threads or processes can acquire and release multiple resources by decrementing and incrementing the count, respectively.

Difference between Mutex and Binary Semaphore: While binary semaphores and mutexes both provide mutual exclusion, there are some differences between them:

Ownership: Mutexes typically have an owner, meaning the thread that locks the mutex is responsible for unlocking it. In contrast, binary semaphores do not have an inherent ownership concept.

Count Value: Binary semaphores have a count that is either 0 or 1, representing the availability of a resource. Mutexes do not have a count value; they are either locked or unlocked.

Usage: Mutexes are often used to protect critical sections of code, allowing only one thread at a time to access the protected region. Binary semaphores, on the other hand, are more general-purpose and can be used to synchronize access to shared resources or coordinate activities among multiple threads or processes.

Signaling: Mutexes provide a mechanism for signaling between threads or processes, allowing them to wait until a specific condition is met. Binary semaphores, while they can be used for similar purposes, are primarily designed for mutual exclusion and resource availability control.

02
Round
Medium
Face to Face
Duration60 minutes
Interview date11 Mar 2023
Coding problem2

1. Ninja And The Game Of Words

Moderate
20m average time
80% success
0/80
Asked in companies
GenpactGoogleGoldman Sachs

Ninja and his friend playing a game in which his friend gave him a string ‘STR’ that can contain spaces and a List/Array ‘WORDS’ which is of type string containing ‘N’ strings of words. Ninja’s task is to count the occurrences of all the words in ‘STR’.

For Example:

‘STR’ = “i am a Ninja”, ‘N’ = 3 and ‘WORDS[]’ = [“Ninja”,”a”,”am”]. Then the output should be [1,1,1]. Because the occurrence of “Ninja” in ‘STR’ is 1 and the occurrence of “a” in ‘STR’ is 1.Similarly occurrence of “am” is 1.

Note:

The output should be in the same order as given in ‘WORDS’.

Can you help Ninja to generate all valid strings from ‘STR’ by minimum removals?

Try solving now

2. Reach the destination

Easy
15m average time
85% success
0/40
Asked in companies
HCL TechnologiesSamsungAmerican Express

Given a source point (sx, sy) and a destination point (dx, dy), the task is to check if it is possible to reach the destination point using the following valid moves:

(a, b) -> (a + b, b)
(a, b) -> (a, a + b)

Your task is to find if it is possible to reach the destination point using only the desired moves or not.

For example:
For the coordinates, source point = (1, 1) and destination point = (3, 5)
The output will be true as the destination point can be reached using the following sequence of moves:
(1, 1) -> (1, 2) -> (3, 2) -> (3, 5)
Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date11 Mar 2023
Coding problem2

1. Count Subarrays with Given XOR

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

Given an array of integers ‘ARR’ and an integer ‘X’, you are supposed to find the number of subarrays of 'ARR' which have bitwise XOR of the elements equal to 'X'.

Note:
An array ‘B’ is a subarray of an array ‘A’ if ‘B’ that can be obtained by deletion of, several elements(possibly none) from the start of ‘A’ and several elements(possibly none) from the end of ‘A’. 
Try solving now

2. Diameter Of Binary Tree

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

You are given a Binary Tree.


Return the length of the diameter of the tree.


Note :
The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.

The number of edges between two nodes represents the length of the path between them.
Example :
Input: Consider the given binary tree:

Example

Output: 6

Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.


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 select an element by class name in CSS?

Choose another skill to practice
Similar interview experiences
company logo
System Engineer
2 rounds | 4 problems
Interviewed by HCL Technologies
986 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 3 problems
Interviewed by HCL Technologies
0 views
2 comments
0 upvotes
company logo
System Engineer
3 rounds | 6 problems
Interviewed by HCL Technologies
715 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 6 problems
Interviewed by HCL Technologies
735 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
System Engineer
2 rounds | 2 problems
Interviewed by Cognizant
4300 views
5 comments
0 upvotes
company logo
System Engineer
3 rounds | 5 problems
Interviewed by Infosys
2663 views
0 comments
0 upvotes
company logo
System Engineer
3 rounds | 3 problems
Interviewed by Tata Consultancy Services (TCS)
2225 views
0 comments
0 upvotes