Lg soft india pvt limited interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

Lg soft india pvt limited
upvote
share-icon
3 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Journey
After completing the DSA course at Coding Ninjas, I embarked on a journey of consistent and dedicated study, engaging in daily problem-solving sessions. As I honed my skills over time, my confidence in tackling complex coding challenges grew substantially. Even as campus placements commenced at my college, I maintained a rigorous practice routine while simultaneously working on meaningful projects. Despite facing rejection in earlier opportunities, each setback fueled my determination and contributed to my personal and professional development. Then, the pivotal moment arrived with the opportunity at Siemens Healthineers, marking a culmination of my efforts and perseverance in the pursuit of excellence.
Application story
LG Soft India Private Limited came to our campus. I applied and was shortlisted for the coding round. After the coding round, two interviews were conducted: first was the technical round and second was the managerial round. After the managerial round, the results were declared.
Why selected/rejected for the role?
I believe I was selected for this role because of my strong understanding of data structures, which enables me to effectively solve coding questions during interviews. My proficiency in data structures allows me to approach problems systematically and devise efficient solutions, ultimately contributing to the success of the team and the objectives of the role
Preparation
Duration: 4 months
Topics: Data Structures (basic to advance),Dynamic Programming,OOPS,Web Development(HTML,CSS,Javascript,React JS,MongoDB),Operating System,SQL query
Tip
Tip

Tip 1 :Practice regularly by solving coding problems on platforms like coding ninja studio,LeetCode to strengthen your problem-solving skills.
Tip 2 : Review and understand the fundamental concepts of data structures and algorithms thoroughly, as they form the backbone of technical interviews.
Tip 3 :Start by understanding the fundamental concepts thoroughly before delving into advanced topics.
Tip 4:Work on improving your communication skills, as they are essential for conveying your ideas effectively in interviews and collaborative environments.

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

Tip 1: Tailor your resume to the specific job you're applying for, highlighting relevant skills and experiences.
Tip 2: Use clear and concise language, avoiding jargon, and ensuring readability with proper formatting and organization.
Tip 3: Quantify your achievements wherever possible to demonstrate your impact and contributions in previous roles.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date3 May 2023
Coding problem3

In the first round, which was the coding round, there were three rounds in total, consisting of 30 multiple-choice questions (MCQs) and 3 coding questions. The objective questions were of intermediate level. One coding question was based on strings, categorized as easy, while the other two questions were related to dynamic programming, categorized as intermediate and hard levels.

1. Contains Duplicate ll

Easy
15m average time
85% success
0/40
Asked in companies
HSBCCerner CorporationBosch Technologies

You have been given an array “ARR” of integers and an integer ‘K’. Your task is to find a pair of distinct indices ‘i’ and ‘j’ such that ARR[i] == ARR[j] and | i - j | <= ‘K’.

Problem approach

The basic idea of this approach is to iterate through all the possible pairs of indices and check if duplicate elements exist satisfying the given constraint in the problem statement. 

Consider the following steps:
Create a loop and start traversing the given array/list using a variable ‘i’ such that 0 <= i < ‘N’.
In a nested loop, start traversing the array/list using a variable ‘j’ such that 0 <= j < i and for each pair of (i, j) check:
If | i - j | <= ‘K’ and ARR[i] = ARR[j], then duplicate elements with given constraint exist in the array/list, therefore return “Yes”.
Else, return false.
Time Complexity
O(N^2), where ‘N’ is the number of elements in the given array/list.

Since we are trying to consider every pair of indices in the given array/list. So the overall time complexity will be O(N^2).
Space Complexity
O(1)
Since we are not using any extra space other than the few variables. So the overall space complexity will be O(1).
code: 
bool containsNearbyDuplicates(vector &arr, int k)
{
// Start traversing the array.
for (int i = 0; i < arr.size(); i++)
{
for (int j = 0; j < i; j++)
{
// Check if current pair satisfies the condition.
if (abs(i - j) <= k && arr[i] == arr[j])
{
return true;
}
}
}

return false;
}

Try solving now

2. Valid Parentheses

Easy
10m average time
80% success
0/40
Asked in companies
OracleAmerican ExpressPayPal

You're given a string 'S' consisting of "{", "}", "(", ")", "[" and "]" .Return true if the given string 'S' is balanced, else return false.For Example:'S' = "{}()".There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').So the 'S' is Balanced

Problem approach

Approach:
Make use of the stack. Traverse the string and push the current character in the stack if it is an opening brace. Else pop from the stack. If it is the corresponding starting brace for the current closing brace, then move to the next character of the string otherwise, return false.
If after complete traversal, if the stack is empty, then the string is balanced else, it is not balanced.

Algorithm:
Declare a character stack.
Now traverse the string.
1- If the current character is a starting bracket ( ‘(’ or ‘{’ or ‘[’ ), then push it to stack.
2- If the current character is a closing bracket ( ‘)’ or ‘}’ or ‘]’ ), then pop from stack, and if the popped character is the matching starting bracket, then fine 
else parenthesis is not balanced.
After complete traversal, if there is some starting bracket left in the stack, then “not balanced”.
Otherwise, the string is balanced.
Time Complexity
O(N), Where ‘N’ is the length of the string.
The traversal of the string is done only once. Hence, the O(N) time complexity.
Space Complexity
O(N), Where ‘N’ is the length of the string.
As the maximum stack size reaches the length of the string, thus the O(N) space complexity.

Code:
bool isValidParenthesis(string s) 

// Make an inbuilt stack.
stack st; 
char x; 

// Traversing int 's'.
for (int i = 0; i < s.length(); i++) 

if (s[i] == '(' || s[i] == '[' || s[i] == '{') 

// Push the element in the stack .
st.push(s[i]); 
continue; 


if (st.empty()) 
{
return false; 
}

// Store the top element.
x = st.top(); 
st.pop(); 

// Check for opening braces in stack of corresponding closing braces.
switch (s[i]) { 
case ')': 

if (x == '{' || x == '[') 
{
return false; 
}
break; 

case '}': 

if (x == '(' || x == '[') 
{
return false; 
}
break; 

case ']': 

if (x == '(' || x == '{')
{
return false;
}
break; 

}

Try solving now

3. Move Zeroes To End

Moderate
30m average time
70% success
0/80
Asked in companies
AmazonMicrosoftThought Works

Given an unsorted array of integers, you have to move the array elements in a way such that all the zeroes are transferred to the end, and all the non-zero elements are moved to the front. The non-zero elements must be ordered in their order of appearance.For example, if the input array is: [0, 1, -2, 3, 4, 0, 5, -27, 9, 0], then the output array must be:[1, -2, 3, 4, 5, -27, 9, 0, 0, 0].Expected Complexity: Try doing it in O(n) time complexity and O(1) space complexity. Here, ‘n’ is the size of the array.

Problem approach

We can create a new array of integers. As soon as we find a non-zero element, we can directly insert it into our new array. After that, we can insert all the left zero’s. 
We can easily calculate the number of left zeroes as :
Size of original array = size of new array + number of zero’s (since we only took non-zero elements.

Algorithm : 
Initialise a non-zero pointer with 0 value.
Start traversing the array until we reach the end,
If a non-zero element is found, insert it in new array. Else,
If a zero element is found, just continue.
After we reach the end, total number of zero’s will be original array size - new array size.
Insert these many zeros into new array.
Time Complexity
O(N)
Since we are maintaining two pointers, and as soon as a non-zero pointer reaches the end, we stop. So the maximum numbers we are visiting is ‘N’ therefore complexity is O(N)
Space Complexity
O(N) 
Since we are creating a new array.

Code:
void pushZerosAtEnd(std::vector &arr) {
int zptr = -1;
int nzptr = -1;
int n = arr.size();
for (int i = 0; i < n; i++) {
if (arr[i] == 0) {
zptr = i;
break;
}
}

if (zptr == -1) {
return;
}

for (int i = zptr + 1; i < n; i++) {
if (arr[i] != 0) {
nzptr = i;
break;
}
}

if (nzptr == -1) {
return;
}

while (nzptr < n) {
// Swapping.
int tmp = arr[zptr];
arr[zptr] = arr[nzptr];
arr[nzptr] = tmp;

zptr++;
while (nzptr < n && arr[nzptr] == 0) {
nzptr++;
}
}
}

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date4 May 2023
Coding problem2

In this technical round, the interviewer presented two coding questions based on data structures and algorithms (DSA). In addition to DSA, the interviewer inquired about computer-based subjects such as database management systems and operating systems. Furthermore, they also questioned me about Java programming and SQL queries.

1. The node pointing towards another node in a B+ tree is known as:a. External nodeb. Leaf nodec. Internal noded. Final node

Just write pseudo code to help the interviewer understand my approach to the question.

Problem approach

Tip: Clear B+ Tree concepts in Data Structures.

Answer: c. Internal node

2. Reverse the Linked List

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

Linked list is given and i have to just reverse the linked list

Problem approach

Step 1: Traverse the linked list starting from the head node.
Step 2: Keep track of the previous, current, and next nodes as you iterate through the list.
Step 3: At each node, update the next pointer to point to the previous node instead of the next node.
Step 4: Move to the next node and continue the process until you reach the end of the list.
Step 5: Once the end of the list is reached, update the head pointer to point to the last node (which was originally the tail).
Step 6: Return the head pointer as the new head of the reversed linked list

Try solving now
03
Round
Medium
Video Call
Duration40 minutes
Interview date4 May 2023
Coding problem3

This is the managerial and HR round, during which the interviewer conducted a detailed discussion about my projects, posed a logical question, and presented a puzzle. Additionally, they asked various behavioral questions and inquired about my journey and the company itself.

1.

The interviewer asked about myself and things I mentioned in my resume like - hobbies, and co-curricular activities

Problem approach

Tip 1 : Be confident.
Tip 2 : Be prepared for scenario-based questions like - what you will do in case of conflict.

2.

The interviewer asked me about my strengths and weaknesses.

Problem approach

Tip 1:Strengths: "I'm good at organizing things and getting tasks done efficiently. Also, I enjoy working with others and am pretty good at communicating ideas."
Tip 2: Weaknesses: "Sometimes I can be too focused on details, which can slow me down a bit. I'm working on finding a balance between being thorough and keeping things moving smoothly."

3.

The interviewer asked me if I am willing to reallocate or not.

Problem approach

Tip 1 : Tell the truth.
Tip 2 : Be positive.

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
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
SDE - 1
2 rounds | 3 problems
Interviewed by Lg soft india pvt limited
945 views
1 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6451 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15481 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15339 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes