Sie sind auf Seite 1von 9

Sapient

21.07

--

1.) Project Complete Architecture details. (How the components are


talking to each other and what all different technologies are getting
used in your project)
2.) High Level: You need to expose the project you have created to
different clients. Clients will request for the data. (Request will contain
the client Id, File path and request time). Different things we need to
implement are:
a. Ignore duplicate client requests. (Duplicate request will be the
one having same client ID and file path)
b. We should serve the requests on FCFS basis. Means the request
should be served based on the request time.
c. We should make sure that this processing is getting done in
asynchronous manner.
3.) RESTFUL web services and SOAP services.
4.) We need to pass the output result object from one machine to another
machine. Both are running in different JVMs.
5.) What extra advantages are provided by Concurrent package over
synchronize keyword.
6.) Want to understand the concept of AOP in springs.
7.) Want to know about the usage of JMS.
8.) Want to know about timer task and Executor service that can be used
to provide the same functionality.
9.) Have you heard of Weak References in java?
10.)
What are Java annotations and how annotations work in java?
How JVM comes to know that this is an Annotation and how it should be
treated?
11.)
Want to understand the concept of Java Memory Model. (What all
memory areas are there in the JMM)
12.)
Have you worked on Hibernate?
13.)
Write a sql query (There are two tables Employee(EmpId,
EmpName, Salary, DepartmentId) and Department(DeptId and
DeptName). From these two tables find the departmentName and
EmployeeName. EmployeeName should be the name of the employee
with maximum salary in that department.

BlackRock
21.07

--

1.) Briefly describe about yourself.


2.) What all Collection classes you have worked upon.
3.) Difference between HashTable and ConcurrentHashMap in java
4.) How ConcurrentHashMap takes lock on segments and how a new
thread is prevented from taking lock on already locked segment.
5.) How JVM came to know that the structure is modified from some other
place after taking the iterator over the collection. (In what scenarios
concurrentmodificationexception will be raised)
6.) What all iterators are fail-safe and what all are fail-fast?
7.) What is the difference between iterator and listIterator in java?
8.) What are atomic operations in java?
9.) Is setting and reading the value of an int primitive type data is atomic
operation in java?
10.)
Is setting and reading the value of a long primitive type data is
atomic operation in java?
11.)
How Java memory model works in java?
12.)
What is the difference between serial GC and parallel GC.
13.)
What are weak hash map in java?
14.)
What is difference between fail-safe and fail-fast?
15.)
Have you heard of the terms weak-reference and soft-reference?
16.)
Which all design patterns you have worked upon.
17.)
What is the utility of Builder design pattern?
18.)
Have you heard of Connection leaking?
19.)
What is use of AOP in springs?
20.)
What is the use of prototype bean in Spring IOC? Can you think
of some scenario where actually multiple instances will be required of
the same bean. Why we are using it?
21.)
Have you worked on JMS?
22.)
Have you worked on Hibernate?
23.)
Rate yourself on SQL?
24.)
Have you ever designed your own algos?
25.)
Write a program to find the longest common substring prefix
among a set of input strings

BlackRock
01.08

--

Saurabh Singh (FMG Group Head) and Vineet


1.) Discussion on your current project and its working. What all
technologies are getting used in it?
2.) Discussion on coding exercise done.
Question 1
Words made up of the same characters arranged in a different order are called
anagrams of each other.
Suppose that you are given a dictionary in the form of a file containing one word per
line (see e.g. /usr/share/dict/words on a Linux box). Your goal is to list all the
anagrams in the dictionary.
That is, emit a file each line of which consists of a comma-separated list of words
that are anagrams of each other. A word is not its own anagram for the purposes of
this question.
For example, the output corresponding to
acre
allergy
angle
band
beast
betas
gallery
glean
largely
race
regally
zebra
Would be
acre,race
allergy,gallery,largely,regally
angle,glean
beast,betas
(up to re-ordering)
Formally, write a command-line utility in Java which has the following syntax:
anagrams <path to dictionary file> <path to anagrams file>
Suppose that the dictionary is made up of N words which are at most M characters
long. What is the worst-case time complexity of your approach in terms of N and M?
Try to make sure its optimal.
Question 2

Given an integer target and binary tree (not a binary search tree!) each of whose
nodes contains an integer (which may be positive or negative), find the set of all
subtrees whose sum equals the given target. The sum of a subtree is just the sum of
the integers contained in its nodes. Note that the subtree does not have to contain
all child nodes - it can be any set of connected nodes.
Question 3
In a casino dice game, you roll a 6-sided die ten times. The payout is one dollar if
the sum of numbers you rolled is less than 35 and the standard deviation of the
numbers you rolled is greater than 1.5, otherwise the payout is zero.
a) Write a function that simulates the game and returns the payout
b) Use this function to estimate the expected value of the payout

3.) Discussion on first solution. What is the complexity of the solution


done? How much time program is taking for performing the sorting
operation on N elements? How much time it is taking while doing
retrieval operation inside the map. What is the utility of hashCode in
the map? What is the time taken for retrieval of any element in
hashMap? (do consider about worst case time complexity)
4.) When is Comparable used in java? How it is used in java. Is any other
thing called before calling the compareTo method of Comparable.
5.) What all places hashCode is getting used and what is the return value
for hashCode method.
6.) When we are comparing two custom objects using equals method of
java What that method is doing and what is getting called before
actually checking for the equality?
7.) Can we use TreeMap as solution of first problem so that retrieval
operation can be changed to O(log N)?
8.) Move to 2nd question on binary trees, what was the thought process
behind it.
9.) Prepare one recursive program for printing all possible subsets of a
tree.
10.)
Prepare one recursive program to do printing of a tree based on
levels. (What this approach is called and what is the complexity of this
problem)
11.)
In your solution to 2nd question, we are maintaining too many
lists and data structures, we should avoid using it.
12.)
What are immutable classes in java?
13.)
What is the utility of immutable classes in java?
14.)
String pool concept in java?
15.)
How garbage collector works in java and what will happen to the
String objects created during the start of main program? When the
String objects will be cleared by the garbage collector. What will
happen if we are making a function call in between with that String

object as an argument, Will it be garbage collected at this point of


time.
16.)
What is the reason for so many frequent changes? (with
justification for each change)
17.)
Open to work in financial domain (Open to work on different
technologies)

Ashish (Manager Round)


1.)
2.)

Discussion on family background.

5.)
6.)
7.)

How much hike are you expecting?

What are your three major strengths and three areas of


improvement?
3.)
What is your current compensation and why are you looking for a
change. Reason for so many frequent changes?
4.)
Any specific reason for joining BlackRock?
About current role and assignments

Solve one puzzle in 3 minutes --There is one monkey and it climbs UP 5 steps in 1st minute and climbs
DOWN 3 steps in 2nd minute. Then again it climbs UP 6 steps in 3rd
minute and climbs DOWN 3 steps in 4th minute. Then again it climbs UP
7 steps in 5th minute and climbs DOWN 3 steps in 6th minute..
continuing like this How many minutes monkey will take to cross 72
steps.
Prepare one equation based on time field (t).

Arun (Group Head)


1.)

What is your current compensation and why are you looking for a
change. Reason for so many frequent changes?
2.)
What advantage we are getting with ConcurrentHashMap, which
Map implementation you have used in solution 1. Is using
ConcurrentHashMap reducing the speed somewhere?

3.)

Have you checked the output is containing only 10 elements


while the input is having 12 elements? Why the number of elements is
reduced in the output?
4.)
Difference between ConcurrentHashMap and normal HashMap.

5.)

What is the List implementation we are using in our code and


what is the complexity, should we not use TreeMap in our code since
we are having the sorted strings are keys of the map.
6.)
Now lets say we have some data containing Id (Integer) and
Date (Long). Integer Ids are in range of 1-10 and Long Date data is in
range of 10,000. We need to prepare map data in such a way the
retrieval is faster (based on the combinations of Ids and Dates we are
able to retrieve the result objects) What Data Structure can be used in
this place for fastest retrieval of objects and should reduce the number
of If conditions also.
7.)
What is Predicate and one more question was asked here?

8.)

Have you worked on Springs. What is AOP programming in Spring


and what all are the different types of Advice do we have?
9.)
What is exception handling mechanism?

10.)
11.)

What is serialization in java and how it works?

Have you worked on Hibernate and JMS? What is JMS and how it
works?
12.) Thats all from my side, if you have any questions you can ask.

Tomorrow, all of us will give collective feedback on your


responses and accordingly HR will update you.

HSBC
20.08

--

1.) Project Complete Architecture details. (How the components are


talking to each other, what all are the protocols getting used and what
all different technologies are getting used in your project)
2.) Write a program for binary search? What will be the time complexity
for this algorithm? Explain an example with help of pictorial
representation.
3.) Write any one sorting algorithm? Explain an example with help of
pictorial representation.
4.) How Hashmap works in java? What is the use of load factor in java?
xxx 1
yyy 2
zzz 3
Now we are putting hm.put(xxx,5). What will happen now?
5.) What do you mean by weak reference and phantom reference in java?
6.) Suppose we have one Hashmap and we have overridden the hashcode
method to return value 100? What will happen now?
7.) What will happen when we use WeakHashMap in java?

8.) How Java Memory model works in java? Explain the different types of
GC? What will be the technique used for garbage collection?
9.) Can we use some custom class as key for hashmap in java? If yes,
what we need to do to make sure that it works properly?
10.)
What is the use of equals and hashcode in java?
11.)
What is the use of web services? How you work on RESTful
webservice?
12.)
Explain what you have done in SOAP webservice in ETOPUP
backend application.
13.)
What design patterns you have used?
14.)
Explain immutable classes in java.

Ephesoft
25.08

--

Spring based interview


1.) What all you have used in Spring? Spring IOC, Spring AOP, Spring MVC,
Spring DI
2.) How servlets work and when they get loaded in the web server? What
is the use of load-on-startup tag. Suppose I have multiple servlets in
my application in which for one servlet I have defined the value 0, for
second value is 1, for third value is 2, and so on. And there are some
servlets for which the value is not present. How and when the servlets
will be loaded in that case?
3.) Suppose we have some application in which we have
Controller, View, Model
We have LoginAction, LoginDao, LoginService, LoginAction2.
4.) How and when spring creates the object during Spring IOC?
5.) What is the workflow of Spring IOC?

6.) What is the use of scope singleton and when the object for this bean
gets created with scope singleton?
7.) Suppose we have one bean with scope singleton and which is
dependent on some other bean with scope prototype. So, when the
object will be created for first bean and when the object will be created
for second bean and how many objects will exist for second bean when
created through first bean?
8.) If we want multiple objects of second bean, how can we achieve this
thing?
9.) Is it necessary to provide default no-argument constructor in spring
bean class? If we do not provide the default no-argument constructor
then what will happen?
10.)
What are the different ways of autowiring in spring?
11.)
What are the different ways of injecting?
12.)
What will happen if we are using auto-wiring method as autodetect.
and so on

Das könnte Ihnen auch gefallen