Placement Papers for All Companies

3i infotech
Abacus Infotech
Abatix
Abaxis
ABB
ACC Limited
Accel Frontline
Accenture
Aditi Technologies
Adobe System
ADP
Agilysys
AgreeYa
AIG
AirNet
Alanco Technologies
Alle Technologies
Allfon
Alter Systems
Amazon
AMDL
Amdocs
AMI
Amiti Software Technologies
ANZ
Apple
Applied Materials
Apps Associates
Aricent
ASDC
Ashok Leyland Ltd
Asian Paints
Aspire System
AT & T
Atlas Copco
Atos Origin
AXA Technology Services
Axes Technology
Bain
Bajaj
Bayer
Bharti Airtel Ltd
Bhawan Cybertek
Birlasoft
Blue Star Infotech
BMC
BOB
Brakes India
C-DOT
CA Technologies
Cadence
Calsoft
Canarys
Capgemini
Caterpillar
Celstream
CGI Group
Changepond Technologies
Cimtrix Systems
Cisco system
Citicorp Overseas Software Ltd
ClinTech
CMC Limited
CMS
Cognizant
Compaq
Consagous Technologies
Convergys
CORDYS
CRISIL
Crompton Greaves
CSC
CSFB
CtrlS Datacenters Ltd
Cummins
Cyient
Daffodil
Daimler
Dell
Deloitte
Delphi-TVS
Dharma Systems
Directi
DSRC
Eicher
ELGI
ELICO
EMC Corporation
Emphasis
Ericsson
Ernst & Young
ESKO
Essar
Facebook
Fanuc Corporation
Fidelity
Flextronics
Flipkart
Freescale
Fujitsu
Gajshield
GE
Genpact India
Geodesic
Geometric Limited
GlobalEdge
GlobalLogic
GMR Group
Godrej Infotech
Google
Grapecity
Harita - TVS
HCL
HCL Technologies
Headstrong
Healthasyst
HEC Ltd
Hexaware
HFCL
Holool
Honeywell
HP
HTC Global Services
Huawei
Hughes
Hyundai
IBM
IBS Software Services
IGate
Ikanos
IKOS
Impetus
iNautix
Indecomm
IndiaBulls Power Limited
Inductis-EXL
Industrial Alliance
Infineon
Infogain
Infosys
Intec
Integra
Intel
Intergraph
ITC Infotech
Jindal Steel and Power Limited
KPIT
L & T
L & T Infotech
LG Soft
Linde India Ltd
LnT Emsys
LnT-ECC
Lucas - TVS
Mahindra Engineering Services Ltd
Mahindra Ltd
Maruti
Matrix
Maveric Systems
McAfee
Microland
Microsoft
Mindtree
Miraclesoft
MKCL
Motorola
Mu-Sigma
Nagarro
NASSCOM
NCR Corporation
Ness Technologies
Neudesic
NIIT Technologies
Novell
Nvidia
Oracle
Persistent
Philips
Planetasia
Polaris
Poornam Info Vision
PSI Data Systems Limited
Quest-Global
Quinnox
R Systems
Redpine
Reliance Energy
Robert Bosch
RS Software
Samsung
SAP labs India
Sapient
Sasken Communications
Schneider India
Serco
Siemens
Sierra Atlantic
SkyTECH
Soliton
Sonata Software
Sony India
SQL Star
Steria
Subex Limited
Sutherland Global Services
Syntel
Talisma
Tata motors
Tata technologies
Tata-ELXSI
TCE
TCS
Tech Mahindra
Temenos
Tesco
Texas Instruments
Thermax
ThoughtWorks
Torry Harris
Triad
Trianz
Trilogy
TVS Motor
Unisys
UnitedHealth Group
UST Global
UTC Aerospace System
Valuelabs
Vedanta
Verifone
Verizon
Virtusa
Vision Infotech
Vizual
VMware
Wipro
Yahoo
YASH Technologies
Zenith
Zensar Technologies
ZTE

Facebook Interview Questions Set 2

Posted on :12-03-2016

Q1. Design a data structure that supports kind of full text search but in numbers. 

We are given file with lot of 10-digits numbers, for example: 

1234 567 890 
4124 123 123 
3123 123 322 

On a given number X we should return all numbers that contain X. 


For example, if the number 123 was given, we should return all numbers (from the list above) because 123 is in all of them. 

If the number 41 was given we should return only the middle number - because the number 41 is only in it.
 
Q2. Design Facebook Messenger backend
 

[[ 0, 2, 3], [1]] (0,2,3 are the same person and 1 is another one)
 
Q3. Search in a sorted rotated array.
 
Q4. Merge K sorted singly linked list
 
Q5. paint a list of N houses and M colors, each combination has cost, minimize the total cost without color in row.
 
Q6. Given array A of size N, using function Random(returns random number between 0 and 1) implement function that will return array of size N with randomly shuffled elements of the array A. 
You should give only algo.

 
Q7. We know a string is Palindrome if it is the same reading from both sides. Now we define the following string also Palindrome: 

A man, a plan, a canal, Panama! 

Write a code that returns if an string is palindrome and it should return true for above input. (Without directly saying, I should conclude that I have to only consider alphanumerical characters in a string). In addition, we assume the string is very long and we can not keep a copy of this string or even a copy of preprocessed version of this string. Therefore the result should be returned with the first sweep of the string.
 
Q8. Given a singly linked list, swap the list items in pairs (reconnect the pointers, not simply swap the values). For example: 

Before: A->B->C->D 
After: B->A->D->C
 
Q9. you have a interface called Op and a Filter interface 
interface Op
public boolean hasNext(); 
public boolean next(); 

interface Filter
public boolean filter(T1 t1, T2 t2); 

design a MutualOp that has below API, MutualOp should return the ops that combine op1 and op2, also should meet with the filter 
class MutualOp implements Op{ 
public MutualOp(Op left, Op right, Filter filter) { 
this.left = left; 
this.right = right; 
this.filter = filter; 

public boolean hasNext { 
...... 

public T next { 
...... 
}
 
Q10. Calculate minimum h-index for a sorted integer array(http://en.wikipedia.org/wiki/H-index)

 

Q11. Given a machine you can try to guess the word, the machine will return how many characters has been matched by your guess. Design a system to crack the word.
 
Q12. Permutate a list of string 
this question is supposed permutate the characters instead of who string, 

as input example {"red", "fox", "super" }, the expected output is 

rfs 
rfu 
rfp 
rfe 
rfr 
ros 
rou 
rop 
roe 
ror 
rxs 
rxu 
rxp 
rxe 
rxr 
efs 
efu 
efp 
efe 
efr 
eos 
eou 
eop 
eoe 
eor 
exs 
exu 
exp 
exe 
exr 
dfs 
dfu 
dfp 
dfe 
dfr 
dos 
dou 
dop 
doe 
dor 
dxs 
dxu 
dxp 
dxe 
dxr
 
Q13. A 2D array filled with integer, define a flow from one point to its neighbor only if the value of current point is not less than its neighbours value. Consider up edge and left edge as east coast, bottom edge and right edge as west coast, find all position that it can flow to east coast and west cost both
 
Q14. Sort an integer array with three functions: findMin(), findMedium(), findMax().
 
Q15. /** 
 Find if the given list of recurring weekly intervals covers the 
 entire time. Times are given up to a second. 
 

 You can take the input intervals in the number of seconds since 
 the beginning the week or any other format you prefer. 
 
 ---Example 1--- 
 Input: 
 Tuesday 9AM - Sunday 9AM 
 Sunday 8:00:20AM - Wednesday 3AM 
 
 Output
 true 
 
 ---Example 2--- 
 Input: 
 Tuesday 9AM - Sunday 9AM 
 Sunday 8:00:20PM - Tuesday 8AM 

Output
 false 
/
 
Q16. /* 
For each node in a binary tree find the next right node on the same depth. Write a function that takes root node and populates "next" with the answer for each node. 

/  
B -> C 
/ /  
D -> F-> G 
/  
H -> I 

class Node { 
Node left; 
Node right; 
Node next; // <-- answer should be stored here 
}; 

B.next = C 
D.next = F 
F.next = G 
H.next = I 
{A, C, G, I}.next = null 
*/
 
Q17. Pangram
 
Q18. In-place Palindrome Check
 
Q19. Dutch national flag w/ get rank followup
 
Q20. Given an array (list) of integers return true(boolean function) if two of the numbers add to 12.
 
Q21. N queen problem. 
In NXN chess board, you have to arrange N queens such that they do not interfere each other. Following is how you define interference of queens. 
1. Two queens cannot be on the same diagonal 
2. Two queens cannot be in same horizontal or vertical line 
3. Queen can jump like a knight. So, two queens cannot be at a position where they can jump two and half steps like a knight and reach the other queen. 

You should return the possible ways to arrange N queens on a chess board. 

This was a tech screen, but since I was local, they called me in their office rather than phone interview. 
 
Q22. I needed to develop next system: 

We have a lot of servers. Every server generate logs. Every log has two data types: first is numeric metrics. These numeric metrics are integer. Second is strings. We need to collect logs from all servers on other server (storage). Then we have to execute queries and get some data from storage. In our queries we have to use numeric metrics and strings as well. For numerics metrics we have to be able get aggregation data as well. 

Develop Storage server, database. Describe how will you scale this system, what database will you use, how will you save data and how will you execute this queries.
 
Q23. Given an array such that every next element differs from the previous by +/- 1. (i.e. a[i+1] = a[i] +/-1 ) Find the local max OR min in O(1) time. The interviewer mentioned one more condition that the min or max should be non-edge elements of the array 
Example: 1 2 3 4 5 4 3 2 1 -> Local max is 5 
1 2 3 4 5 -> No local max or min exists 
5 4 3 2 1 -> No local max or min exists
 
Q24. Write a function that calculates the minimum number of meeting rooms that can accommodate given schedules 
input: same 

Output: # of rooms 
Also back to back events are allowed e.g. {2,5} {5,9} correct o/p:1
 
Q25. Write a function that detects conflicts in given meeting schedules 
input: a list of intervals, [(s1, e1), (s2, e2), ] 
output: return True if theres any conflict, False otherwise
 
Q26. Given a tokenized PHP file, give me a map from class to list of functions
 
Q27. There are 3 romms in which party is going on lets say room A, B, C. Guests are coming one by one and you have to tell the guest 
which room to enter. At any point of time each room has to maintain a percentage Lets say the percentage that each room has to maintain is 
A- 20% , B-30% , C- 50%. You can maintain total count of each room and keep on adding count to respective room as the new guest enters each room. 
How would you go about it. What formula would you use. 
Give a generalise formula so that it works if no. of rooms increase.

 
Q28. You are given a 2nd rectangular array of positive integers representing the height map of a continent. The "Pacific ocean" touches the left and top edges of the array and the "Atlantic ocean" touches the right and bottom edges. 
- Find the "continental divide". That is, the list of grid points where water can flow either to the Pacific or the Atlantic. 
Water can only flow from a cell to another one with height equal or lower. 

Example: 

Pacific ~ ~ ~ ~ ~ |__ 
~ 1 2 2 3 (5) ~ 
~ 3 2 3 (4)(4) ~ 
~ 2 4 (5) 3 1 ~ 
~ (6)(7) 1 4 5 ~ 
__ (5) 1 1 2 4 ~ 
|~ ~ ~ ~ ~ Atlantic 

The answer would be the list containing the coordinates of all circled cells:
[(4,0), (3,1), (4,1), (2,2), (0,3), (1,3), (0,4)]
 
Q29. Implement stairs(N) that (collect the solutions in a list) prints all the ways to climb up a N-step-stairs 
where one can either take a single step or double step. 
Well use 1 to represent a single step, and 2 to represent a double step. 


stairs(3) 
111 
12 
21


  
   






FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

closepop
closepop