


LinkedIn Software Developer Intern Interview Questions and Answers
Q1. Determine Count of Good Triplets
You are given two arrays ARR1
and ARR2
, containing N
and M
elements respectively. There are two types of 'good triplets' that need to be identified in these arrays.
Type 1: A tr...read more
Calculate the total number of 'good triplets' in two arrays based on given conditions.
Iterate through all possible triplets in both arrays and check if they satisfy the conditions
Use nested loops to iterate through all combinations of indices in both arrays
Check the conditions for Type 1 and Type 2 'good triplets' separately
Increment a counter for each valid 'good triplet' found
Return the total count of 'good triplets' for each test case
Q2. Split the String Problem Statement
You are given a string str
consisting of N
lowercase alphabets. Your task is to determine if it is possible to divide the string into three non-empty substrings such that one ...read more
Given a string, determine if it can be split into three non-empty substrings where one is a substring of the other two.
Check if any substring of the string is a substring of the other two substrings.
Iterate through all possible divisions of the string into three non-empty substrings.
Use two pointers to find all possible substrings efficiently.
Q3. DFS Traversal Problem Statement
Given an undirected and disconnected graph G(V, E)
, where V
is the number of vertices and E
is the number of edges, the connections between vertices are provided in the 'GRAPH' m...read more
DFS traversal to find connected components in an undirected and disconnected graph.
Use Depth First Search (DFS) to traverse the graph and find connected components
Maintain a visited array to keep track of visited vertices
For each unvisited vertex, perform DFS to explore the connected component it belongs to
Print the vertices of each connected component in ascending order
Q4. Median of Two Sorted Arrays Problem Statement
Given two sorted integer arrays A
and B
with sizes N
and M
respectively, find the median of the combined array that results from merging arrays A
and B
. If the tota...read more
Find the median of two sorted arrays after merging them.
Merge the two sorted arrays into one sorted array.
Calculate the median based on the length of the combined array.
Handle cases where the total number of elements is even or odd.
Q5. Check if Two Trees are Mirror
Given two arbitrary binary trees, your task is to determine whether these two trees are mirrors of each other.
Explanation:
Two trees are considered mirror of each other if:
- The r...read more
Check if two binary trees are mirrors of each other based on specific criteria.
Compare the roots of both trees.
Check if the left subtree of the first tree is the mirror of the right subtree of the second tree.
Verify if the right subtree of the first tree is the mirror of the left subtree of the second tree.
Q6. Snake and Ladder Problem Statement
Given a 'Snake and Ladder' board with N rows and N columns, where positions are numbered from 1 to (N*N) starting from the bottom left, alternating direction each row, find th...read more
Find the minimum number of dice throws required to reach the last cell on a 'Snake and Ladder' board.
Use Breadth First Search (BFS) to find the shortest path from the starting cell to the last cell.
Maintain a queue to explore all possible moves from each cell.
Consider the effect of snakes and ladders on the movement of the player.
Handle the case where the last cell is unreachable by returning -1.
Optimize the solution by using a visited array to avoid revisiting cells.
Interview Process at LinkedIn Software Developer Intern

Top Software Developer Intern Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

