Linkedin interview questions

96 questions from 16 candidate reports · 2014 to 2024

Online test

DSA

Showing 41 of 75 reported in this area

Detect a cycle in an undirected graph.
asked oncemediumPractice this →
Serialize and deserialize a binary tree.
asked oncemediumPractice this →
Find all factor combinations for a given number.
asked oncemediumPractice this →
Given a string, find the number of unique substrings
asked oncemediumPractice this →
Find the longest palindromic subsequence in a given string.
asked oncemediumPractice this →
Check if there exists a triplet in an array with a given target sum.
asked oncemediumPractice this →
Given a string S, find the longest subsequence of S that is a palindrome.
asked oncemediumPractice this →
Extract all leaf nodes of a binary tree and store them in a doubly linked list.
asked oncemediumPractice this →
Find the minimum sum of the product of two arrays by rearranging their elements.
asked oncemediumPractice this →
Evaluate the value of an arithmetic expression written in Reverse Polish Notation.
asked oncemediumPractice this →
Given a binary tree, check whether it is a Binary Search Tree with O(1) extra space.
asked oncemediumPractice this →
Design an algorithm to calculate the stock span for each day given daily stock prices.
asked oncemediumPractice this →
Given a matrix of 0s and 1s, find the number of connected components consisting of 1s.
asked oncemediumPractice this →
Explain the approach and write pseudocode for a medium-level DSA problem.
asked oncemediumPractice this →
Design an efficient approach to check for isomorphic words in a file using a map-based solution.
asked oncemediumPractice this →
Given an unsorted array of positive integers, find all possible triplets that can form a triangle.
asked oncemediumPractice this →
Optimal Strategy for a Game problem where two players pick values optimally to maximize their score.
asked oncemediumPractice this →
Given the preorder traversal of a binary tree, check whether it represents a valid Binary Search Tree (BST).
asked oncemediumPractice this →
Given a number N, print all combinations in which the number can be represented as a sum of positive integers
asked oncemediumPractice this →
Given a mapping between numbers and alphabets and a numeric string, find the number of ways to decode the sequence.
asked oncemediumPractice this →
Perform level order traversal of a binary tree and print a special character (e.g., '$') after completing each level
asked oncemediumPractice this →
Given a string and a pattern, find the smallest window in the string that contains all the characters of the pattern.
asked oncemediumPractice this →
Given a string, print all unique strings of length k formed from its characters such that characters are in increasing order
asked oncemediumPractice this →
Find the minimum number of moves required for a knight to reach a given ending position from a given starting position on a chessboard.
asked oncemediumPractice this →
Given start and end times of n tasks, find the minimum number of machines required so that no two overlapping tasks run on the same machine.
asked oncemediumPractice this →
Given a string containing characters and numbers, parse all numeric values (including negatives and decimals), sum them, and return the result.
asked oncemediumPractice this →
Find the total number of visible nodes in a binary tree, where a node is visible if it has the highest value on the path from the root to that node.
asked oncemediumPractice this →
Given a string of comma-separated integers, find the longest subsequence consisting of consecutive integers (in any order) and print them in increasing order
asked oncemediumPractice this →
Given a matrix where data[i][j] denotes the j-th employee's attendance on the i-th day, find the maximum number of consecutive days when all employees were present.
asked oncemediumPractice this →
Given n ticket windows with ai tickets each, where ticket price equals remaining tickets in that window at sale time, find the maximum revenue after selling m tickets.
asked oncemediumPractice this →
Find the repeating and the missing number in an array of size n containing numbers from 1 to n. Discuss multiple solutions along with their time and space complexities.
asked oncemediumPractice this →
Given the root of a binary tree and two values val1 and val2, find the length of the path between the two nodes. Handle corner cases where both values lie on the same path.
asked oncemediumPractice this →
Given an array receiver where receiver[i] indicates the next friend a ball is passed to each second (1-indexed), starting from friend 1, determine which friend has the ball after k seconds.
asked oncemediumPractice this →
Given an array of integers, repeatedly remove any two elements, add their sum back to the array, and incur a cost equal to that sum. Find the minimum total cost required to reduce the array to a single element.
asked oncemediumPractice this →
Given an array counts where counts[i] represents the size of the friend group user i belongs to, determine whether the implied grouping of users into friend groups is valid based on minimal user IDs for each group size.
asked oncemediumPractice this →
Given a 2D matrix of size MxN filled with 0s and 1s, starting from (0,0) you can move only right or down. A cell with 1 is passable and 0 is blocked. Count the number of paths from (0,0) to (M-1,N-1). Return the result modulo 1e9+7.
asked oncemediumPractice this →
There are n ticket windows at a railway station, where the i-th window has ai tickets available. The price of a ticket is equal to the number of tickets remaining at that window at the time of sale. If m tickets are sold in total, what is the maximum revenue that can be earned?
asked oncemediumPractice this →
There are n ticket windows in a railway station. The i-th window has ai tickets available. The price of a ticket is equal to the number of tickets remaining in that window at the time of sale. If m tickets are sold in total, what is the maximum amount of money that can be earned?
asked oncemediumPractice this →
Given a string, find the number of distinct substrings with optimized time and space complexity.
asked oncehardPractice this →
Explain the approach and write pseudocode for a hard-level DSA problem related to trees or graphs.
asked oncehardPractice this →
Given a string, find the number of distinct palindromic substrings with optimized time complexity.
asked oncehardPractice this →

CS fundamentals

Showing 6 of 34 reported in this area

Write SQL queries to solve medium-difficulty DBMS problems
asked oncemediumPractice this →
Explain the rolling hash technique and its applications in string algorithms.
asked oncemediumPractice this →
Explain XSS attacks and how to prevent them. Do the same for SQL Injection attacks.
asked oncemediumPractice this →
Networking-focused questions including practical networking aspects relevant to system design
asked oncemediumPractice this →
Which database should be used in which scenarios, especially comparing SQL and NoSQL databases?
asked oncemediumPractice this →
Explain the Fisher-Yates shuffle algorithm and why it produces equal probability for all permutations.
asked oncemediumPractice this →

System design

Showing 10 of 12 reported in this area

Explain modern web architecture as it stands today.
asked oncemediumPractice this →
Design a system architecture for an application at scale
asked oncemediumPractice this →
Design a scalable file server system and handle scalability at each component
asked oncemediumPractice this →
Discuss high-level system design considerations for breaking down a single monolithic application into components.
asked oncemediumPractice this →
Design the backend database for an e-commerce product page to support displaying product details, average rating, and number of customers for each rating.
asked oncemediumPractice this →
Design a system where a PPT is viewed live by N users in their browsers, and pressing next/previous by the presenter updates the slide for all connected users in real time.
asked oncemediumPractice this →
Design a Google Calendar–like system.
asked oncehardPractice this →
Design a complete system for a traffic enforcement camera.
asked oncehardPractice this →
How would you handle system design challenges during a company merger or large-scale migration?
asked oncehardPractice this →
How do you choose between scalability, performance, and quality when making engineering decisions?
asked oncehardPractice this →

Behavioural

Showing 3 of 11 reported in this area

How do you handle conflict resolution with your peers?
Is there a cost to code reviews, and how do you balance it?
How do you manage people, including hiring and firing decisions?

Showing 60 of 96 questions. Ranked by how often the same question came back across reports.

Practise a Linkedin-style interview

A spoken interview built from these questions, scored when you finish; the report is yours.

Start practising

Common questions

What questions does Linkedin ask?

Candidate interview reports most often cover DSA (57%) and CS fundamentals (26%).

How many rounds does Linkedin interview have?

Candidate interview reports show an average of 3.9 rounds per experience, with a typical sequence of Online test. Individual interview paths can vary.

Is the Linkedin interview hard?

Among questions with a reported difficulty, the mix is easy 32%, medium 56%, hard 12%.

Keep reading