Linkedin Interview Questions
- 0of 0 votes
Answerssys design: alerting and monitoring system with different granularities : 1 hour, 1 day etc
- ikf4 April 29, 2021 in India| Report Duplicate | Flag | PURGE
Linkedin Software Engineer - 0of 0 votes
AnswersDesign a graph problem, given an function getFriend(int user) which returns all the users 1st degree friends, write a function to check:
- ikf4 April 29, 2021 in India
1. whether two users are first-level, second-level and third-level connections
2. function that outputs a users 2nd degree and 3rd degree friends| Report Duplicate | Flag | PURGE
Linkedin Software Engineer - 0of 0 votes
AnswersIntelligent Substrings:
- himatNIT February 09, 2020 in United States for Hacker rank test
There are two types of characters in a particular language: special and normal. A character is special if its value is 1 and normal if its value is 0. Given string s, return the longest substring of s that contains at most k normal characters. Whether a character is normal is determined by a 26-digit bit string named charValue. Each digit in charValue corresponds to a lowercase letter in the English alphabet.
Example:
s = 'abcde'
alphabet = abcdefghijklmnopqrstuvwxyz
charValue = 10101111111111111111111111
For clarity, the alphabet is aligned with charValue below:
alphabet = abcdefghijklmnopqrstuvwxyz
charValue = 10101111111111111111111111
The only normal characters in the language (according to charValue) are b and d. The string s contains both of these characters. For k = 2, the longest substring of s that contains at most k = 2 normal characters is 5 characters long, abcde, so the return value is 5. If k = 1 instead, then the possible substrings are ['b', 'd', 'ab', 'bc', 'cd', 'de', 'abc', 'cde']. The longest substrings are 3 characters long, which would mean a return value of 3.| Report Duplicate | Flag | PURGE
Linkedin SDE1 - 0of 0 votes
AnswerYou are given an N-Dimensional list with 2 methods:
- neer.1304 May 27, 2019 in United States
i) getDim -> returns the dimensions .e.g [5,4,3].
ii) getElement([i,j,k]) -> return list[i][j][k] . You have to implement a method to sum all elements in the list.| Report Duplicate | Flag | PURGE
Linkedin Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersRead data from a API call that gives org structure data in JSON format and arrange that data in requested format
- logan July 05, 2018 in United States| Report Duplicate | Flag | PURGE
Linkedin Site Reliability Engineer Python - 0of 0 votes
Answerslog file parsing.
- logan July 05, 2018 in United States| Report Duplicate | Flag | PURGE
Linkedin Site Reliability Engineer Python - 0of 0 votes
Answersprint LinkedIn if a number is divisible by 4 and 6, Linked if it is divisible by 4 and in it is by 6.
- logan July 05, 2018 in United States| Report Duplicate | Flag | PURGE
Linkedin Site Reliability Engineer Python - 0of 0 votes
AnswersFor a given set of non-negative integers get the number of subsets that add up to a target value k.
- vmayer99 April 30, 2018 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer Algorithm - 0of 0 votes
AnswersFor a given array of integers compute the maximum sum of any range in the array. Then modify the function to find maximum product (note the effect of negatives on max product).
- vmayer99 April 30, 2018 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer - 0of 0 votes
AnswersWrite a function to compute n^k. (don't forget negative exponents)
- vmayer99 April 30, 2018 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer Algorithm - 0of 0 votes
AnswerImplement below methods
- kay March 16, 2018 in United States for Tools team
//stores the number in some data structure
void store(n);
//tests whether the given number is present as sum of 2 numbers from the data structure store
boolean test(v);
e.g. store -> 1, 3, 5, 6
tests
4 = true (1 + 3)
5 = false (no sum will result into this)
6 = true (1 + 5)| Report Duplicate | Flag | PURGE
Linkedin Member Technical Staff - 0of 0 votes
Answerswrite a program to list factors of a given number
- kay March 16, 2018 in United States for Tools team
e.g. for input as 12, factors are 1, 2, 3, 4, 6, 12| Report Duplicate | Flag | PURGE
Linkedin Member Technical Staff - 0of 0 votes
AnswersConvert Roman to integer and vice-versa
- maddog January 13, 2018 in United States| Report Duplicate | Flag | PURGE
Linkedin Intern - 1of 1 vote
AnswerPrint a binary tree level by level and zig zag order.
- maddog January 13, 2018 in United States| Report Duplicate | Flag | PURGE
Linkedin Intern - 1of 3 votes
AnswerCongrats to F.L.
- aonecoding November 03, 2017 in United States
Got offers from - Youtube(G), LinkedIn, Airbnb, Square, Wish, Blend and NextDoor!
Thanks for sharing the interview experience with us.
LinkedIn
Phone:
- Questions from LC tagged LinkedIn.
Onsite:
- Get sqrt(x). Output a floored integer if result is not a perfect square. sqrt(18) = 4
- Implement BST, insert, delete, search.
- Design a dashboard for service logs stats (sort and aggregate). Scale from 1 to more machines. Discuss async and realtime as different scenarios.| Report Duplicate | Flag | PURGE
Linkedin Software Engineer Algorithm - 1of 1 vote
AnswerIII. Square root of a number?
- aonecoding August 30, 2017 in United States
IV. Expression operators? Add signs (+, -, *, /) to a string to form target
V. Top trending posts in last 5m, 1H, 1Day?| Report Duplicate | Flag | PURGE
Linkedin Software Engineer Algorithm - 0of 0 votes
AnswersI. Closest K nodes to a target in BST? (Do it in O(n)?)
- aonecoding August 30, 2017 in United States
II. Nested List sum?| Report Duplicate | Flag | PURGE
Linkedin Software Engineer Algorithm - 0of 0 votes
Answers/**
* A tournament tree is a binary tree
* where the parent is the minimum of the two children.
* Given a tournament tree find the second minimum value in the tree.
* A node in the tree will always have 2 or 0 children.
* Also all leaves will have distinct and unique values.
* 2
* / \
* 2 3
* / \ | \
* 4 2 5 3
*
* In this given tree the answer is 3.
*/
- lkpunisher April 05, 2017 in United Statesclass Node { Integer value; Node left, right; Node(Integer value, Node left, Node right) { this.value = value; this.left = left; this.right = right; } } class Solution { /** * This should return the second minimum * int value in the given tournament tree */ public static Integer secondMin(Node root) { } }
| Report Duplicate | Flag | PURGE
Linkedin Senior Software Development Engineer Trees and Graphs - 0of 0 votes
AnswersGiven a number n that represents n lockers and n students. All lockers start closed. First student goes and opens all the lockers. Second goes and toggles 2nd, 4th, 6th.. lockers. Third student toggles 3rd, 6th, 9th.. lockers. Print the lockers that remain open after all students pass.
- lkpunisher April 05, 2017 in United Statespublic void lockers(int n) { // Implementation here }
| Report Duplicate | Flag | PURGE
Linkedin Senior Software Development Engineer Math & Computation - 0of 2 votes
AnswersHow to randomly select a number in an array?
- aonecoding March 22, 2017 in United States
array: [15, 2, 4, 5, 1, -2, 0]
Follow-up:
Given a second array freq where freq[i] represents the occurrence of the ith number in array, how to randomly select a number in array based on the frequency.
Extra requirement:
Could you complete the selection in a single-pass(go through each array only once)?| Report Duplicate | Flag | PURGE
Linkedin Software Engineer Algorithm - 2of 2 votes
Answers/**
* Given a nested list of integers, returns the sum of all integers in the list weighted by their REVERSED depth.
* For example, given the list {{1,1},2,{1,1}} the deepest level is 2. Thus the function should return 8 (four 1's with weight 1, one 2 with weight 2)
* Given the list {1,{4,{6}}} the function should return 17 (one 1 with weight 3, one 4 with weight 2, and one 6 with weight 1)
- xankar March 03, 2017 in United States*/ public int reverseDepthSum (List<NestedInteger> input) { // implementation here }
| Report Duplicate | Flag | PURGE
Linkedin Backend Developer Algorithm - 0of 0 votes
AnswersPrint an NxM matrix with nw-se diagonals starting at bottom left corner. Ex:
1 2 3 4 5 6 7 8 9 10 11 12
The output should be:
- dora January 06, 2017 in United States9 5 10 1 6 11 2 7 12 3 8 4
| Report Duplicate | Flag | PURGE
Linkedin - 0of 0 votes
AnswersIf you can hop 1, 2, or 3 steps at a time, calculate the total number of possible combinations for `n` steps.
- noitidart December 10, 2016 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer Algorithm - 0of 0 votes
Answerspublic interface FirstCommonAncestor {
/**
* Given two nodes of a tree,
* method should return the deepest common ancestor of those nodes.
*
* A
* / \
* B C
* / \ \
* D E H
* / \
* G F
*
* commonAncestor(D, F) = B
* commonAncestor(C, G) = A
* commonAncestor(E, B) = B
*/
Node commonAncestor(Node one, Node two);
}
- BeingUpfront December 01, 2016 in United Statesclass Node { final Node parent; final Node left; final Node right; public Node(Node parent, Node left, Node right) { this.parent = parent; this.left = left; this.right = right; } boolean isRoot() { return parent == null; } }
| Report Duplicate | Flag | PURGE
Linkedin Senior Software Development Engineer Data Structures - 0of 0 votes
AnswersFind unique integers from list of integers
# Question # Write a function that will return an array of integers that occur exactly once in a given array of integers. # e.g. For a list [1,2,3,5,2,2,3,4], return [1,5,4] since they appear once (order does not matter). def once_integers(integers):
Follow up:
Optimize the code if input is sorted.
- Saurabh October 03, 2016 in United States for Software Developement - Tools# What if the input is sorted, such as [1,2,2,2,3,3,4,5], could the algorithm be further optimized # (e.g. space complexity)? def once_integers_sorted(integers):
| Report Duplicate | Flag | PURGE
Linkedin Software Developer - 0of 0 votes
AnswersString Rotation. Given two string check if String1 is rotating match for String2
- Saurabh October 03, 2016 in United States for Software Developement - Tools# Given two strings. Write a function that will return true if one string is a rotation of the other string. # e.g. 'bca' and 'cab' are rotations of 'abc' and the function should return true # 'barbazfoo', 'oobarbazf' and 'rbazfooba' are rotations of 'foobarbaz' def is_rotation(string1, string2):
| Report Duplicate | Flag | PURGE
Linkedin Software Developer Algorithm - 0of 0 votes
AnswersYou are designing the client side of a Survey website. Provide the list of classes and methods you will use to break the problem down. Also, provide the API interaction with server.
- andy.r.nathan September 18, 2016 in United States| Report Duplicate | Flag | PURGE
Linkedin Senior Software Development Engineer Object Oriented Design - 0of 0 votes
AnswersGiven an array of numbers find the duplicates
- andy.r.nathan September 14, 2016 in United States for Mobile| Report Duplicate | Flag | PURGE
Linkedin Software Developer Algorithm - 1of 1 vote
AnswersSuppose you have a list of Dishes, where each dish is associated with a list of ingredients. Group together dishes with common ingredients.
- andy.r.nathan September 14, 2016 in United States for Mobile
E.g:
Input:
"Pasta" -> ["Tomato Sauce", "Onions", "Garlic"]
"Chicken Curry" --> ["Chicken", "Curry Sauce"]
"Fried Rice" --> ["Rice", "Onions", "Nuts"]
"Salad" --> ["Spinach", "Nuts"]
"Sandwich" --> ["Cheese", "Bread"]
"Quesadilla" --> ["Chicken", "Cheese"]
Output: ("Pasta", "Fried Rice") ("Fried Rice, "Salad") , ("Chicken Curry", "Quesadilla") ("Sandwich", "Quesadilla")
Follow up: What is the time and space complexity?| Report Duplicate | Flag | PURGE
Linkedin Software Developer Algorithm - 2of 2 votes
AnswersBasic background questions, describe a situation where you proposed a design and it was opposed. What did you do to convince people that your design was sound. Describe a situation where something you suggested resulted in improved process or caused a big positive impact on the company, etc.
- palak.chokshi July 01, 2016 in United States| Report Duplicate | Flag | PURGE
Linkedin Senior Software Development Engineer Experience