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

SDE - 1

HCL Technologies
upvote
share-icon
2 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Prepare some Projects
Tip 2 : Practice At least 250 Questions of DS algo
Tip 3 : Do at least 2 application based projects

Application process
Where: Campus
Eligibility: 7.0
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 Minutes
Interview date1 Sep 2019
Coding problem0

ALGO, Aptitude, SQL

02
Round
Medium
Video Call
Duration45 minutes
Interview date15 Sep 2019
Coding problem2

This round lasted for 45 min. Started with the introduction later he asked me from my projects mentioned in the resume then from the OOPS after that i was asked to share my screen and 2 dsa problems were given.

1. Merge Sort Linked List

Moderate
10m average time
90% success
0/80
Asked in companies
AdobeSamsung R&D InstituteHCL Technologies

You are given a Singly Linked List of integers. Sort the Linked List using merge sort.

Merge Sort is a Divide and Conquer algorithm. It divides the input into two halves, calls itself for the two halves, and then merges the two sorted halves. The merge() function is used for merging two halves. The merge(arr, L, M, R) is a key process that assumes that arr[L..M] and arr[M + 1...R] are sorted and merges the two sorted subarrays into one.

Problem approach

1. If the size of the linked list is 1 then return the head
2. Find mid using The Tortoise and The Hare Approach
3. Store the next of mid in head2 i.e. the right sub-linked list.
4. Now Make the next midpoint null.
5. Recursively call mergeSort() on both left and right sub-linked list and store the new head of the left and right linked list.
6. Call merge() given the arguments new heads of left and right sub-linked lists and store the final head returned after merging.
7. Return the final head of the merged linkedlist.

Try solving now

2. Longest Valid Substring

Moderate
15m average time
85% success
0/80
Asked in companies
AmazonHCL TechnologiesMorgan Stanley

You are given a string 'STR' consisting only of opening and closing parenthesis i.e. '(' and ')', your task is to find out the length of the longest valid parentheses substring.

Note:
The length of the smallest valid substring '()' is 2.
For example:
'STR' = “()()())” here we can see that except the last parentheses all the brackets are making a valid parenthesis. Therefore, the answer for this will be 6.
Problem approach

1) Create an empty stack and push -1 to it. 
The first element of the stack is used 
to provide a base for the next valid string. 

2) Initialize result as 0.

3) If the character is '(' i.e. str[i] == '('), 
push index'i' to the stack. 

2) Else (if the character is ')')
a) Pop an item from the stack (Most of the 
time an opening bracket)
b) If the stack is not empty, then find the
length of current valid substring by taking 
the difference between the current index and
top of the stack. If current length is more 
than the result, then update the result.
c) If the stack is empty, push the current index
as a base for the next valid substring.

3) Return result.

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
company logo
SDE - 1
2 rounds | 6 problems
Interviewed by HCL Technologies
1250 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by HCL Technologies
1495 views
4 comments
0 upvotes
company logo
SDE - 1
2 rounds | 6 problems
Interviewed by HCL Technologies
1949 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by HCL Technologies
2258 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6365 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2197 views
0 comments
0 upvotes