Linkedin Interview Questions
- -1of 1 vote
AnswersGiven a file using regex find all the ip address ina text file.
- jimmy514in March 21, 2013 in India| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - -3of 3 votes
AnswersGiven a string , " This is a test" reverse it: " tset a si siht"
- jimmy514in March 21, 2013 in India
Do this recursively.| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - 1of 3 votes
AnswersWrite a program to find the element in an array that is repeated more than half number of times. Return -1 if no such element is found.
- Expressions March 19, 2013 in India| Report Duplicate | Flag | PURGE
Linkedin SDE1 Arrays - 3of 3 votes
AnswersThere is rotated sorted array.Write the program to find any element in that array
- akash.patel06@sjsu.edu February 22, 2013 in United States
Original Array A={1,2,3,5,6,7,8}
Rotated Array B={5,6,7,8,1,2,3}
Write the program to find any element in array B| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - -1of 3 votes
AnswersImplement DFS for binary tree
- anonymous February 22, 2013 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - 1of 1 vote
AnswersThere are 2 sorted sets.Find the common elements of those sets
- anonymous February 22, 2013 in United States
e.g.
A={1,2,3,4,5,6}
B={5,6,7,8,9}
o/p C={5,6}
Complexity should ne 0(n+m) where n and m is the size of the first and second set respectively
Which data structure should be used to store the output| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm Data Structures - 0of 0 votes
AnswersWrite an algorithm to evaluate the Postfix Expression
- Rajat January 09, 2013 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - 0of 0 votes
AnswersImplement the integral part logn base 2 with bit manipulations
- Rajat January 09, 2013 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - -1of 1 vote
AnswersHow do you design a column database
- xiaolong_fighting December 29, 2012 in United States| Report Duplicate | Flag | PURGE
Linkedin Application / UI Design - 0of 0 votes
Answersimplement Java's pow function, then list test cases, examine performance, see if you can optimize performance.
- rollingstar.15 October 30, 2012 in United States for NA
public double pow(double a, int b)| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Coding - 1of 1 vote
AnswersImplement a thread-safe Blocking queue in C/C++(POSIX) or Java
- Steve September 14, 2012 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Data Structures - 0of 0 votes
AnswersWrite a function that would return the 5th element from the tail (or end) of a singly linked list of integers, in one pass, and then provide a set of test cases against that function (please do not use any list manipulation functions that you do not implement yourself).
- tani August 08, 2012| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Coding - 1of 1 vote
AnswersWrite a multithreaded blocking version of Bounded Queue.
- Anon June 21, 2012 in United States for systems and infrastructure
There are writers which fill up the queue, and then readers which empty the queue.
If q is full, writer should block. If Q is empty readers should block.
The Queue size is finite... (its bounded).
Maximize parallelism, minimize resource usage etc...| Report Duplicate | Flag | PURGE
Linkedin Threads - 2of 2 votes
AnswersConsider this string representation for binary trees. Each node is of the form (lr), where l represents the left child and r represents the right child. If l is the character 0, then there is no left child. Similarly, if r is the character 0, then there is no right child. Otherwise, the child can be a node of the form (lr), and the representation continues recursively.
- Itcecsa April 08, 2012 in United States
For example: (00) is a tree that consists of one node. ((00)0) is a two-node tree in which the root has a left child, and the left child is a leaf. And ((00)(00)) is a three-node tree, with a root, a left and a right child.
Write a function that takes as input such a string, and returns -1 if the string is malformed, and the depth of the tree if the string is well-formed.
For instance:
find_depth('(00)') -> 0
find_depth('((00)0)') -> 1
find_depth('((00)(00))') -> 1
find_depth('((00)(0(00)))') -> 2
find_depth('((00)(0(0(00))))') -> 3
find_depth('x') -> -1
find_depth('0') -> -1
find_depth('()') -> -1
find_depth('(0)') -> -1
find_depth('(00)x') -> -1
find_depth('(0p)') -> -1| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a large document and a short pattern consisting of a few words (eg. W1 W2 W3), find the shortest string that has all the words in any order (for eg. W2 foo bar dog W1 cat W3 -- is a valid pattern)
- shekhar2010us December 18, 2011 in United States for Data Scientist| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - 0of 0 votes
AnswersFind and store all the valid numbers in an array that are in the string including negative, positive, hexadecimal, octal, binary?
- sonu.hzb.bhr December 14, 2011 in India
For example string "abcd 0xa 11.12 123" has values 10, 11.12 , 123.
I would rephrase the question: find all words(separated from other words through tabs or spaces) in the string that can be expressed in the form of decimal number. After the words are obtained store their value in the array.| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - 0of 0 votes
AnswersPrint every level in a tree in its own line. Its a modified version of Breadth First Tree traversal.
- Noname December 05, 2011 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - 0of 0 votes
AnswersWrite a method to test if a String is number.
- Noname December 05, 2011 in United States
Check for all the cases like '.', '-', '+' ascii values multiple occurance of sysmbols.
Objective: Cover all the use cases| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - 0of 0 votes
AnswersConvert and infix expression to postfix expression
- Noname December 05, 2011 in United States| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a function for pow(double a,int b)? Prepare floating point intricacies in java...
- NuclearTeen November 23, 2011 in United States for Security| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Java Algorithm - 0of 0 votes
AnswersConvert a character string into a value based on the radix or base.
- kamalsinghy November 05, 2011 in United States
Input parameters:
1. char *str such as "3523" (in decimal),
"11001" (in binary),
"a1f38c" (in hex)
2. radix or base(such as decimal:10, binary:2, hex:16, octal:8)
Return: integer value (not unsigned) that is calculated based on the input string and radix or base.
for example: string is "343432" (base 10): return value 343432
string is "10010" (base 2): return value is 18
string is "a1b" (base 16): return value is 187.
Tell the algo and write a program?| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - 0of 0 votes
AnswersWhat is the difference between HashSet and TreeSet implementation of a Set ?
- Soulslayer August 24, 2011| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - 0of 0 votes
AnswersDramatic - You need to find if a given sentence (a line of text) is available in a given magazine. You can not reuse letters. Think like, you are asking for some ransom, putting someone at gun point.You grab a magazine (weekly) and start tearing/cutting letters to form the sentence "I want blah blah money". Write a function that tells the given magazine has all the letters/alphabets sufficiently to form the sentence.
- raig August 12, 2011| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - 0of 0 votes
Answers// find the pair in an array .... that sum up to particular number
- Anonymous August 11, 2011| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - 0of 0 votes
AnswerF2F Round 4: Design a hangman game web application.
- Pal July 16, 2011| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - 0of 0 votes
AnswersF2F round 1: Edit distance dynamic programming question
- Pal July 16, 2011| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm - 1of 1 vote
AnswersDisplay an integer array of [1, 2, 3, 4, 5, 6, 7] in the following format
- Anonymous May 09, 2011
1 4 6
2 5 7
3
The method signature takes in an array of integers and the number of columns. In the above example, noOfCols = 3. The columns should contain equal number of elements as much as possible.| Report Duplicate | Flag | PURGE
Linkedin - 0of 0 votes
AnswersProvide an implementation of the following interface:
- Anonymous April 14, 2011
public interface Powers extends Iterator<Long>
{
/* Returns the next integer a in the arithmetic sequence of integers where
* a = m^n, m > 1 n > 1, and m and n are both integers
* Thus, the first few outputs will be 4, 8, 9, 16, 25, 27, 32, 36, etc.
*/
public Long next();
/* Resets the sequence to the beginning, such that the next call to next()
* will return 4.
*/
public void reset();
}| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer - 0of 0 votes
AnswersYou have n infinitely large sorted streams, and you have to get an output stream which returns the combined stream..
- crackit February 25, 2011
end of the battle!| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Algorithm