Filter interviews by
I was interviewed before Mar 2021.
Round duration - 60 minutes
Round difficulty - Hard
3 DSA based questions were given to be solved within 60 minutes.
You are given a sorted array representing keys of a BST and an array of frequency counts showing how often each key is searched. Your task is to construct a binary search tre...
Construct a BST with minimum search cost based on keys and frequencies.
Create a recursive function to construct the BST by considering all possible root nodes.
Calculate the cost for each possible BST and return the minimum total cost.
Optimize the solution by using dynamic programming to store intermediate results.
Ensure that the keys are sorted and frequencies are provided for each key.
Example: For keys [1, 3, 5] and f...
Given a string WORD
containing lowercase English alphabets and having length N
, determine the number of distinct substrings in WORD
.
The first line...
Count the number of distinct substrings in a given string.
Iterate through all possible substrings and store them in a set to avoid duplicates.
Use nested loops to generate all substrings efficiently.
Consider using a hash set to store unique substrings.
Example: For input 'abcd', generate substrings 'a', 'ab', 'abc', 'abcd', 'b', 'bc', 'bcd', 'c', 'cd', 'd'.
Given a string 'S', identify and print all distinct palindromic substrings within it. A palindrome reads the same forwards and backwards. For example, 'bccb' is a pali...
Find and print all distinct palindromic substrings in a given string.
Iterate through all possible substrings of the input string.
Check if each substring is a palindrome.
Store distinct palindromic substrings in a set to avoid duplicates.
Sort the set of palindromic substrings and print them space-separated.
Round duration - 60 minutes
Round difficulty - Medium
Technical Interview round where the interviewer asked 2 DSA problems.
Given a binary tree and the values of two distinct nodes, determine the distance between these two nodes in the tree. The distance is defined as the minimum num...
Calculate the distance between two nodes in a binary tree.
Traverse the tree to find the paths from the root to each node
Find the lowest common ancestor of the two nodes
Calculate the distance by adding the distances from each node to the common ancestor
Given a string strNum
that represents a number, the task is to determine the number of ways to decode it using the following encoding: 'A' - 1, 'B' - 2, ..., 'Z' - 26.
The task is to determine the number of ways to decode a given number string using a specific encoding.
Use dynamic programming to solve the problem efficiently.
Consider different cases like single digit decoding, double digit decoding, and invalid cases.
Handle edge cases like leading zeros and empty string inputs.
Implement a recursive function with memoization to avoid redundant calculations.
Round duration - 60 minutes
Round difficulty - Medium
Technical interview round where I was given 2 DSA problems to solve.
You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).
A Binary Search Tr...
Validate if a given binary tree is a Binary Search Tree (BST) or not.
Check if the left subtree of a node contains only nodes with data less than the node's data.
Check if the right subtree of a node contains only nodes with data greater than the node's data.
Recursively check if both the left and right subtrees are also binary search trees.
You are given a non-empty grid that consists of only 0s and 1s. Your task is to determine the number of islands in this grid.
An island is defined as a group of 1s (re...
Count the number of islands in a grid of 0s and 1s connected horizontally, vertically, or diagonally.
Iterate through the grid and perform depth-first search (DFS) to mark visited land cells as water.
Increment the island count each time a new island is encountered during DFS.
Consider all adjacent cells (horizontally, vertically, and diagonally) while exploring the island.
Ensure to handle boundary conditions and check fo...
Round duration - 30 minutes
Round difficulty - Easy
Typical HR round where he asked questions on my resume and challenges faced in my project.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Solution to performing operations on a large array of bits.
Use bitwise operators to perform operations on individual bits
Use a loop to iterate through the array and perform the operations
Ensure that the array is large enough to accommodate all the bits
Consider using a data structure like a bitset for efficient bit manipulation
I was interviewed before Mar 2021.
Round duration - 60 minutes
Round difficulty - Easy
In first round they asked me 2 coding questions where he asked me to code as close as possible to the actual one.
Ninja is tasked with merging two given sorted integer arrays ARR1
and ARR2
of sizes 'M' and 'N', respectively, such that the merged result is a single sorted array w...
Merge two sorted arrays into one sorted array in place.
Use two pointers to compare elements from both arrays and place them in the correct position in ARR1.
Start from the end of ARR1 and compare elements from both arrays, placing the larger element at the end of ARR1.
Continue this process until all elements from ARR2 are merged into ARR1.
Given a document represented as an array/list ARR
of words with length N
, find the smallest distance between two given words for multiple queries. The distance is defined as the ...
Find the smallest distance between two words in a document for multiple queries.
Iterate through the document array to find the indices of the two words in each query.
Calculate the absolute difference between the indices to get the distance.
If a word from the query is not present in the document, return the length of the document array.
Repeat the process for each query and output the smallest distance for each.
Round duration - 60 minutes
Round difficulty - Easy
Then in the second round they asked a little about tree and told me to code 2 codes.
Given a binary tree of integers, return the level order traversal of the binary tree.
The first line contains an integer 'T', representing the number of te...
The problem requires implementing a function to return the level order traversal of a binary tree.
Implement a function that takes the root of the binary tree as input and returns the level order traversal of the tree.
Use a queue data structure to perform level order traversal.
Process each level of the tree one by one, starting from the root node.
Print the node values at each level in the order they appear from left to ...
Given an array of distinct positive integers ARR
and a non-negative integer 'B', find all unique combinations in the array where the sum is equal to 'B'. Numbers can be c...
Find all unique combinations in an array where the sum is equal to a given target sum, with elements in non-decreasing order.
Use backtracking to generate all possible combinations.
Sort the array to ensure elements are in non-decreasing order.
Track the current combination and sum while backtracking.
Terminate recursion when the sum equals the target sum.
Avoid duplicates by skipping elements that have been used in previou
Round duration - 30 minutes
Round difficulty - Easy
HR round with typical behavioral problems.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
LinkedIn interview questions for popular designations
I was interviewed before Mar 2021.
Round duration - 60 minutes
Round difficulty - Medium
This was a online test round where I was given 3 DSA questions to be solved in 60 minutes.
You are provided with a number of stairs, and initially, you are located at the 0th stair. You need to reach the Nth stair, and you can climb one or tw...
The problem involves finding the number of distinct ways to climb to the Nth stair by taking one or two steps at a time.
Use dynamic programming to solve the problem efficiently.
The number of ways to reach the Nth stair is the sum of the number of ways to reach the (N-1)th stair and the (N-2)th stair.
Handle base cases for N=0 and N=1 separately.
Consider using modulo 10^9+7 to avoid overflow in calculations.
You are playing a coin game with your friend Ninjax. There are N
coins placed in a straight line.
Here are the rules of the game:
1. Each coin has a value associated wit...
The problem involves finding the optimal strategy to accumulate the maximum amount in a coin game with specific rules.
Start by understanding the rules of the game and how players take turns to choose coins.
Consider the scenario where both players play optimally to maximize winnings.
Iterate through different strategies to determine the best approach for selecting coins.
Keep track of the total winnings accumulated by eac...
Given an integer N
, your task is to create all possible valid parentheses configurations that are well-formed using N
pairs. A sequence of parentheses is considered w...
Generate all possible valid parentheses configurations using N pairs.
Use backtracking to generate all possible combinations of parentheses.
Keep track of the number of open and close parentheses used.
Add '(' if there are remaining open parentheses, and add ')' if there are remaining close parentheses.
Base case: when the length of the generated string is 2*N, add it to the result array.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Get interview-ready with Top LinkedIn Interview Questions
Top trending discussions
Some of the top questions asked at the LinkedIn interview -
The duration of LinkedIn interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 40 interviews
Interview experience
based on 183 reviews
Rating in categories
Trust and Safety Specialist
73
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
65
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
59
salaries
| ₹0 L/yr - ₹0 L/yr |
Content Reviewer
37
salaries
| ₹0 L/yr - ₹0 L/yr |
Account Director
31
salaries
| ₹0 L/yr - ₹0 L/yr |
Microsoft Corporation
Amazon