LinkedIn logo

LinkedIn Software Engineer System Design Questions

43 practice questions for LinkedIn Software Engineer interviews

LinkedIn software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer

No verified questions yet for LinkedIn.

system design Senior api design #1

1. [OA] Twitter Feed — Design a system to display recent activities for LinkedIn users

LinkedIn needs a feature similar to Twitter feeds, where users can see recent activities of their connections. This involves multiple classes coordinating data retrieval and display.
Problem statement: Design a class TwitterFeed that handles user activity feeds and allows users to follow/unfollow other users.
- Input: Methods to postTweet(userId: int, tweet: str), getNewsFeed(userId: int), follow(followerId: int, followeeId: int), and unfollow(followerId: int, followeeId: int).
- Output: List[str] for getNewsFeed, containing up to 10 most recent tweets from the user and their followed users.
- Constraints:
- UserIds are in the range of 1 to 10^4
- Tweet content can be up to 140 characters.
system design Senior caching #2

2. [OA] LRU Cache — Design a caching mechanism to store recently accessed user profiles

To enhance performance, LinkedIn requires a caching system that follows the LRU (Least Recently Used) principle for user profile data retrieval.
Problem statement: Design and implement a class LRUCache that supports the following operations:
- get(key: int) -> int: Returns the value of the key if the key exists, otherwise return -1.
- put(key: int, value: int): Update the value of the key if the key exists, or add the key-value pair if the key does not exist. When the cache reaches its capacity, it should invalidate the least recently used item before inserting a new item.
- Input: capacity - maximum number of items the cache can hold.
- Output: int for get, no output for put.
Example 1:
Input: ["LRUCache", "put", "put", "get", "put", "get", "get", "put", "get"], [[2], [1, 1], [2, 2], [1], [3, 3], [2], [4], [1], [3]]
Output: [null, null, null, 1, null, 2, -1, null, 3]
Explanation: The cache operates under the mentioned rules and examples.
Constraints:
- 1 <= capacity <= 3000
- 0 <= key, value <= 10^4

Related LinkedIn Software Engineer interview prep

Start practicing LinkedIn questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free