Trilogy Innovations interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

Trilogy Innovations
upvote
share-icon
6 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Journey
I started in my 3rd year and solved more than 1500 questions on various coding platforms such as Leetcode and CodeStudio, and participated in and practiced questions on CodeStudio. Created more than 30 projects on React JS, and Node JS. Also made projects on Blockchain. When started my placement journey in the college, I cracked 6 on-campus and four off-campus placements.
Application story
I asked for a referral from an SDE-2 working in the company using LinkedIn; after a week, I received a call from HR, and he gave me a coding test that I needed to complete in a given time. After that, there were multiple interview rounds.
Why selected/rejected for the role?
The primary reason for my selection was my strong knowledge of core subjects and fundamentals and my problem-solving ability.
Preparation
Duration: 2 Months
Topics: Competitive Programming, Dynamic Programming, Trees and Graphs, Quants, Vocab
Tip
Tip

Tip 1 : Practice competitive programming.The level of questions asked in the programming round is pretty high.
Tip 2 : Have 1 project you know inside and out.

Application process
Where: Other
Eligibility: None
Resume Tip
Resume tip

Tip 1 : Make sure you really know everything about any project you put on your resume. They will pick up anything from there randomly and grill you on it.
Tip 2 : Highlight what you learnt from your projects.

Interview rounds

01
Round
Easy
Online Coding Test
Duration120 Minutes
Interview date1 Aug 2021
Coding problem3

This was an online coding round with 3 questions. It was held in the evening. The level of questions was pretty high. I don't remember all the problems now, but there was one graphs, one on dp, and one on combinatorics. One thing I would suggest is to be well versed with graphs, trees and DP. In all the rounds of theirs I have seen, these topics are always asked.

1. Ways To Make Coin Change

Moderate
20m average time
80% success
0/80
Asked in companies
AmazonCIS - Cyber InfrastructureLinkedIn

You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change for value V using coins of denominations from D. Print 0, if a change isn't possible.

Try solving now

2. Bipartite Graph

Moderate
0/80
Asked in companies
ArcesiumDunzoCIS - Cyber Infrastructure

Given an undirected graph of ‘V’ vertices (labeled 0,1,..., V-1) and ‘E’ edges . Your task is to check whether the graph is bipartite or not.

A bipartite graph is a graph whose vertices can be divided into two sets such that each edge of the graph connects one vertex from the first set and another vertex from the second set.
We can also define a bipartite graph as a graph which can be colored using two colors such that no two adjacent vertices have the same color. 

For example: 
Input: 
4 4
0 1
0 2
1 3
2 3

An undirected graph to the above input is shown below:

In the given input, the number of vertices is 4, and the number of edges is 4.
In the input, following the number of vertices and edges, a list of pairs of numbers is given where each pair (u, v) denotes an edge between vertex u and v.
As per the input, there is an edge between vertex 0 and vertex 1.
The vertices 0 and 2 have an edge between them.

The vertices 1 and 3 have an edge between them.
The vertices 2 and 3 have an edge between them.

As the graph can be colored using two colors, and no adjacent vertices share the same color, the graph is bipartite. 
Try solving now

3. Ninja And The New Year Guests

Moderate
30m average time
60% success
0/80
Asked in companies
Red HatCapegemini Consulting India Private LimitedTrilogy Innovations

Ninja has organized the new year party and invited all the programmers for it, as being the programmer also has been invited by Ninja.

To detect whether the guest is a programmer or not, Ninja has set some tasks for them, such that only programmers can code them.

You have also been asked to solve and code the following task to verify your identity.

Given two integers, 'N' and 'K' find the number of permutation arrays of 'N' integers from 0 to 'N' - 1 satisfying the below condition.

There should be at least 'K' positions in the array such that 'ARR[I] = I' ( 0 <= I < N ) satisfies.

You are required to output the answer modulo 10^9 +7.

EXAMPLE:
Input: 'N' = 4 'K' = 3 
Output: 1

There is only one permutation [0, 1, 2, 3] such that a number of elements with 'ARR[I] = I' is 'K' = 3.
Try solving now
02
Round
Hard
Online Coding Interview
Duration15 Minutes
Interview date1 Oct 2022
Coding problem0

There are 50 questions, based on English, logic and maths. The test is for 15 minutes, and the cutoff is 45. The logic and maths questions were pretty easy, but I practiced GRE words for the English section. You can take this test anytime in the window they provide (it was a few weeks), and you get 2 attempts.

03
Round
Medium
Telephonic
Duration30 minutes
Interview date1 Nov 2021
Coding problem0

This was a telephonic resume round. It was in the evening. The interviewer asked me to choose any one project or internship from my resume, and then proceeded to grill me on it. He asked me about why I used the technologies that I did for the project, and then about certain improvements that could be made to the project and how I would go about them.

04
Round
Medium
Video Call
Duration60 Minutes
Interview date2 Nov 2021
Coding problem2

This was the DSA round, in which I was given 2 questions to solve. It was in the afternoon. The interviewer was really encouraging, and helped me a little when I got stuck on the 2nd question.

1. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
HCL TechnologiesInformaticaSamsung

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Problem approach

I was already familiar with Kadane's Algorithm. This problem was a slight modification of that. First, I set up the basic code for Kadane's algorithm, and then I created a dp[n][2] array. Here, dp[i][0] stores the largest subarray sum up to that index (basic Kadane's algorithm), and dp[i][1] stores the highest subarray sum up to that index, given you have squared one element somewhere till that index. dp[i][0] will simply follows kadane's algorithm, and dp[i][1] = max(dp[i-1][0] + a[i]*a[i], dp[i-1][1]+a[i]). The final answer is max(dp[i][1]) for i 1..n.
The time complexity of this approach is O(N).
This was the first approach I came up with. The interviewer asked me to dry run this, and was satisfied with the solution.

Try solving now

2. Square Submatrix with sum less than or equal to K

Moderate
30m average time
70% success
0/80
Asked in companies
MicrosoftWolters KluwerTrilogy Innovations

Given a 2-dimensional matrix of size ‘N’ x ‘M’ and an integer K. Find the size of the largest square sub-matrix whose sum is less than or equal to K. The size of a matrix is the product of rows and columns in it.

A sub-matrix is a matrix obtained from the given matrix by deletion of several (possibly, zero or all) rows/columns from the beginning and several (possibly, zero or all) rows/columns from the end. A square matrix is a matrix which has the same number of rows and columns.

For Example

example

Note
If there is no square sub-matrix with a sum less than or equal to K, then return 0.
Problem approach

My first approach was brute force. I created a 2d-prefix sum array for the given matrix, and then iterate over all possible squares in this matrix. For each square, I checked if the sum was <=k, and stored the highest size of all such squares.
I was stuck for a bit here, and didn't know how to optimise this further. After a small hint from the interviewer, I came up with the solution. Fix the top left corner of the square, and binary search for the bottom right corner. So first, iterate over all the elements in the matrix. Using binary search and the prefix sum matrix, find the largest square such that the sum is <=k. The time complexity of this is O(n*m*log(min(n, m))). The interviewer was satisfied with this approach.

Try solving now
05
Round
Medium
Video Call
Duration60 Minutes
Interview date3 Nov 2021
Coding problem2

This was an open ended discussion round. It was held in the afternoon. First, the interviewer asked me about an internship I done earlier, and asked me to code an algorithm for a problem related to that. After that, he asked me an open ended question, and we discussed about optimising the solution as well.

1. System Design Question

When users scroll social media, the often miss some posts when they are scrolling quickly. How will you ensure that the posts they scrolled past too fast will show up again in an infinite scroll? I was asked to code an algorithm for this as well. My approach was to listen for scroll events and measure the time that each post was on the screen for. I was also asked how I would persist this data in a way that makes it easy to retrieve.

Problem approach

Tip 1 : Think about the larger picture, not only how you will perform the particular task, but about what changes you will need in other places to accommodate this.

2. System Design Question

Design a text compressor for Google Docs. I went with Huffman Encoding, since I had done a project on it earlier. I needed to optimise this for changes made in the middle of the document. The approach was to split the document into smaller parts, and encode each one independently.

Problem approach

Tip 1 : I would recommend checking out Gaurav Sen on YouTube. The level of the question was not as high, but you'll get a better idea on how to approach these questions.

06
Round
Easy
HR Round
Duration15 Minutes
Interview date4 May 2022
Coding problem1

This was an HR round with the CEO. He was really nice, and asked basic questions. 

1. Basic HR Questions

Why I wanted to join the company, and why I would be a good fit.

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
SDE - Intern
4 rounds | 5 problems
Interviewed by Trilogy Innovations
3991 views
0 comments
0 upvotes
SDE - Intern
5 rounds | 4 problems
Interviewed by Trilogy Innovations
973 views
0 comments
0 upvotes
SDE - Intern
5 rounds | 3 problems
Interviewed by Trilogy Innovations
4965 views
0 comments
0 upvotes
SDE - Intern
4 rounds | 6 problems
Interviewed by Trilogy Innovations
1998 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15480 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15338 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes