Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
LTI - Larsen & Toubro Infotech interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

LTI - Larsen & Toubro Infotech
upvote
share-icon
4 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 Month
Topics: Data Structures, DBMS, OOPS, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice Medium level question.
Tip 2 : Do atleast 2 projects
Tip 3 : More Focus on your Communication skill

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

Tip 1 : Full Command on your resume and make short atleast 1 page with normal color and font.
Tip 2 : Have mentioned some good projects on resume.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration100 Minutes
Interview date22 Sep 2020
Coding problem2

1. Change Start Node

Easy
20m average time
85% success
0/40
Asked in companies
AdobeAmazonGreendeck

You are given a singly linked list and an integer ‘K’. You are supposed to make ‘K’ th node from the end of a linked list as the starting node of the linked list.

Note :
Given ‘K’ will always be valid.
Try solving now

2. Valid Parentheses

Easy
10m average time
80% success
0/40
Asked in companies
OracleSwiggyAmerican Express

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.
Try solving now
02
Round
Medium
Online Coding Interview
Duration120 Minutes
Interview date23 Sep 2020
Coding problem2

1. Alien dictionary

Hard
46m average time
50% success
0/120
Asked in companies
GoogleInfo Edge India (Naukri.com)Facebook

You have been given a sorted (lexical order) dictionary of an alien language.


Write a function that returns the order of characters as a string in the alien language. This dictionary will be given to you as an array of strings called 'dictionary', of size 'N'.


Example :
If the dictionary consists of the following words:-
["caa", "aaa", "aab"], and 'K' is 3.

Then, the order of the alphabet is -
['c', 'a', 'b']
Note:
If the language consists of four letters, the four letters should be the starting four letters of the English language. 

However, their order might differ in the alien language.
Try solving now

2. Chocolate Problem

Moderate
15m average time
85% success
0/80
Asked in companies
AdobePaytm (One97 Communications Limited)JP Morgan

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

1. Each student gets at least one packet of chocolate.

2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Example :

Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

subsequence

And chocolates in each packet is : {8, 11, 7, 15, 2}

All possible way to distribute 5 packets of chocolates among 3 students are -

( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’

Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Try solving now
03
Round
Medium
Online Coding Interview
Duration120 Minutes
Interview date22 Sep 2020
Coding problem2

1. Flip The Bits

Easy
25m average time
75% success
0/40
Asked in companies
BarclaysalibabaLTI - Larsen & Toubro Infotech

Ninja has a binary string ‘S’ of length ‘N’. Initially, all the characters in a string are ‘1’, i.e.

S[i] = ‘1’ for each 1 <= ‘i’ <= ‘N’.

An operation is defined as choosing a number between 1 to 4, and doing the following steps accordingly.

1. If the chosen number is 1, then flip all the characters in string.

2. If the chosen number is 2, then flip all the characters at odd indexes.

3. If the chosen number is 3, then flip all the characters at even indexes.

4. If the chosen number is 4, then flip all the characters at (3k + 1) indexes. 

You need to find out that after performing operations exactly ‘M’ number of times, how many distinct final strings can be there.

Note :
1. A binary string is a string in which all characters are either ‘1’ or ‘0’.

2. Flipping a character means that if the character is ‘1’ then change it to 0, or if it is ‘0’ then change it to ‘1’.
Try solving now

2. Inplace rotate matrix 90 degree

Easy
12m average time
80% success
0/40
Asked in companies
OLX GroupOracleApple

You are given a square matrix of non-negative integers of size 'N x N'. Your task is to rotate that array by 90 degrees in an anti-clockwise direction without using any extra space.

For example:

For given 2D array :

    [    [ 1,  2,  3 ],
         [ 4,  5,  6 ],
         [ 7,  8,  9 ]  ]

After 90 degree rotation in anti clockwise direction, it will become:

    [   [ 3,  6,  9 ],
        [ 2,  5,  8 ],
        [ 1,  4,  7 ]   ]
Try solving now
04
Round
Medium
Online Coding Interview
Duration120 Minutes
Interview date25 Sep 2020
Coding problem2

1. Next Greater Element

Easy
10m average time
90% success
0/40
Asked in companies
IBMInfo Edge India (Naukri.com)Amazon

You are given an array 'a' of size 'n'.



The Next Greater Element for an element 'x' is the first element on the right side of 'x' in the array, which is greater than 'x'.


If no greater elements exist to the right of 'x', consider the next greater element as -1.


For example:
Input: 'a' = [7, 12, 1, 20]

Output: NGE = [12, 20, 20, -1]

Explanation: For the given array,

- The next greater element for 7 is 12.

- The next greater element for 12 is 20. 

- The next greater element for 1 is 20. 

- There is no greater element for 20 on the right side. So we consider NGE as -1.
Try solving now

2. Basic HR Questions

Why should we hire you?

What are your expectations?

Some puzzles

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What does HTML stand for?

Choose another skill to practice
Start a Discussion
Similar interview experiences
SDE - 1
2 rounds | 4 problems
Interviewed by LTI - Larsen & Toubro Infotech
2356 views
3 comments
0 upvotes
SDE - 1
2 rounds | 5 problems
Interviewed by LTI - Larsen & Toubro Infotech
539 views
0 comments
0 upvotes
SDE - 1
4 rounds | 5 problems
Interviewed by LTI - Larsen & Toubro Infotech
0 views
0 comments
0 upvotes
SDE - 1
3 rounds | 4 problems
Interviewed by LTI - Larsen & Toubro Infotech
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
5761 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
5003 views
3 comments
0 upvotes