Showing posts with label career. Show all posts
Showing posts with label career. Show all posts

Friday, 2 December 2016

TUI interview

Date: 2 December 2016
Mode: Telephonic.
Duration : 30 minutes.

Questions:

  1. What do you do in your current project?
  2. What are cronjobs? How do you set them?
  3. What is trigger? How does it work? What are the libraries that it uses internally?
  4. Explain whole indexing process?
  5. Explain whole order process?
  6. How does Action and Task work in Hybris?
  7. How to speed up impexes?
  8. Does it matter if the order of declarations are changed in an impex?
  9. What are integration frameworks?
  10. What are service frameworks?
  11. Explain how addons work.
  12. How to determine if an attribute is classification or regular hierarchical.

Tuesday, 21 April 2015

Pratham Software

Pratham Software

Round I:
  1. What is a controller in spring MVC?
  2. Where is the mapping for a controller?
  3. In which files is the controller?
  4. What are the annotations used in a controller?
  5. How does AJAX calls hit the controller?
  6. How does the controller decide which view to show for which method?
    Talking about web.xml in any of the above questions did not cut any ice. He was expecting something very different.
  7. Can you write business logic in controller?
  8. Controller, controller, controllercontrollercontroller and more controller.
    This guy was totally obsessed with controller.
  9. Execution process of a hit in spring MVC.
  10. How does a Dispatcher Servlet work?
  11. What do you know about JavaScript and JQuery?
  12. What are the various objects involved in a JavaScript?
  13. Difference between a SOAP and REST call?
  14. What is a WSDL?
  15. What is the full form of WSDL?
All this and lot more about web services, spring MVC and dear ol' controller.

Monday, 17 November 2014

Amazon Interview

Amazon

Date: 15 November 2014
Venue : Nehru Place

Questions:

  1. Create a balanced Binary Search Tree from a sorted array.
  2. A 2-D matrix is filled with only zero and one. Each row is sorted i.e. each row has zero's on the left side and one's on the right side.Find the row with maximum number of one's.
  3. Create a NGE array for an array. NGE : Next Greater Element. For each element find the next larger element to the right. If there is no larger element to the right then show -1.
    Eg:
    An array : {5,1,23,4,7,5,88,2} will have a NGE : {23,23,88,7,88,-1,-1}.
    5    1    23  4  7    5    88   2
    23  23  88  7  88  88  -1  -1

Saturday, 15 November 2014

Noida Phase 2

Noida Phase 2 is a shithole in a larger shithole called Noida. Actually Noida is not even a real place. Its just an acronym for "North Okhla Industrial Development Area". There are no railway stations, airports or decent localities. However, what makes it very real is the crime that's increasing exponentially. And as if this was not enough they came up with a novel concept. One fine day the government guys bored with years of tea and politics came up with a brilliant idea. Yo Dawg. Lets make a Noida within Noida so you can do crime while you do crime.
Yo Dawg!!!

 And then there was light. Apart from the fact that there are no means to reach there and your mobile phone will stop receiving any signal, they have started charging 10 bucks for even entering the God forsaken place. Needless to stay it gets even better as night approaches. But the best part of Noida Phase 2 are the companies that dwell there. Last time when i visited one i have to go through a warehouse cross a beaten track to reach another warehouse which bravely displayed the company logo. On asking the guard about the whereabouts of the firm i had my 'Alice in Wonderland' moment. He stooped, literally, pulled a few levers and lifted a shutter to reveal an entire company inside. Lo and behold. Next time i went for walk-in a company which was virtually established in a disco.
What adventures await when i will visit it next time is stuff for nightmares.

Thursday, 13 November 2014

Deloitte interview

Just had a telephonic interview with Deloitte. And Deloitte exploited Hybris real bad.

Hybris Questions:

  1. Lots of question about items.xml.
  2. Difference between Collection and relation?
  3. Dynamic attribute in an item type.
  4. How to declare an item?
  5. How to extend an item?
  6. Structure of items.xml.
  7. Various tags in items.xml.
  8. Difference between type and item.
  9. How to ensure that some particular attribute is not added to DB through persistence. Something to do with dynamic attribute.
  10. Catalog vs Catalog version?
  11. How many active catalogs are there?
  12. How to make more than one active catalog?
  13. Architecture of cockpit.
  14. What are interceptor? 
  15. How many types of interceptor?
  16. What is modelcontext?
  17. Difference between save() and saveall() in modelservice.
  18. Entire hierarchy of catalog. Whatever that means!
  19. Relation between cronjob and trigger.
  20. Flexiquery.getbyexample() or something like that.
  21. Impex structure.
  22. Lazy loading in hybris.
  23. Price Groups in Hybris
  24. What if the delimiter in impex file i.e.semicolon(;) is changed to something else. How can this be done? 
Then it was plain ol' Java stuff. Its remarkable how the java questions were so easy while Hybris ones were tougher beyond recognition.
  1. What is dynamic polymorphism, with examples.
  2. Difference between final, finalize and finally.
  3. Daemon threads
  4. Difference between ArrayList and LinkList.
  5. Difference between Set and HashSet.
  6. Objects in a JSP.
  7. Life-cycle of JSP.
  8. Tag files.
Now, all this and more was bombarded within 15 minutes. And my eager interviewer was asking the next question before i can answer the previous one.
Gotta say i feel quite drenched. Need a chilled cold coffee, though a nice fuck wont hurt either!!!!

Interview dare of the century

Tomorrow i will attempt the interview dare of this century. Okay, maybe that's exaggerated a bit, but I will be attending three interviews back to back on Friday, Saturday and Sunday. All of them in very well reputed firms. The catch is that i am not intending to join any of them.

  1. Ebix solutions: Or should i say, some Ebix Solutions. Must be a small firm with couple of employees and even lesser projects running on support. As usual, they will ask the finest of the finest details of Java and J2EE. Stuff that you never use in development, with the sole purpose of proving that interviewer is the most awesome dude in documented universe. The interview is scheduled from 10:00 am to 4:00 pm. I am planning to visit around 3:00 pm. The location is some God-forsaken place in Noida extension.
  2. Amazon: Here it gets interesting. Its AMAZON guys. Yes, that one firm for which honest, good to earth engineers will slit throats and dance nude. Its simply the best that India has to offer, apart from Microsft, Google, Adobe, Google and Facebook. And if you clear this one then you are licensed to get selected in all of them. However, its not exactly an easy-peesy task. Amazon (and the likes) are obsessed with algorithms and data structures beyond your wildest imaginations. They want you to create a double link list out of a red-brown tree that satisfies AVL by using stacks that are implemented through queues for a data that is arranged in a sparse matrix in O(1). Yes O(1), O(n) is not enough O(log n) is not enough and even though the question might ask you to sort entire libraries the answer HAS to be in O(1). Still, there are tips and tricks. Decent amount of time on GeeksForGeeks and similar websites can provide you with some ammo. How lethal it is can only be confirmed in the interview. By the way, how do i know all this? Well, because i have attended the interview before as well. Though i have told the HR that i have never been through one. This interview is on Saturday in some 5-star hotel. Sounds promising.
  3. HCL: Good old HCL. The Flying Dutchman must always have a captain. Any job seeker must always go to HCL. I already have an entire post on my previous experience. What happens on coming Sunday, must not be very different. Again, i lied to the HR guy about never attending an interview there.
All in all, its gonna be hectic as hell. I can only wish that they are not releasing any must-watch movie this weekend and i am really glad about catching 'Interstellar' last week. Also, pardon me for any silly mistake in the article. The bloke sitting in front is watching a scantily clad Gauhar Khan and it isn't exactly serving as a booster to my concentration. And, they say i am the only one does not do any work in the company. Anyway guys keep watching this space for more. Long live interview tourism.

Monday, 4 August 2014

HCL Interview Walk In

Date : 26 July 2014
Venue : HCL TECHNOLOGIES, SEC-125, MAPLE TOWER, NOIDA.
             It's right behind Amity University. Hire an auto from Sec-37 or get one from Kalindi Kunj (if you are coming from Delhi). It's strange how both of them charge you the same amount.

Pre-Interview:
    The event being a walk-in, was swarmed by job seekers from nook and corners of Delhi-NCR. A long line awaited entry in the much-desired HCL building. The guard provides an entry slip (make sure to keep it carefully). You will be asked to return it on exit. Also, an id for verification would be required (PAN, Passport, Voter ID or Driver Licence). Its pathetic how grown ass bastards (mostly girls), don't bring an i-card and start whining before the guard. Bhaiyaaaaa...plzzzzzzz......Also, they will keep your bags before they move you for interview. So, make sure that you do not bring anything valuable. Then i was moved for the interview. And this is where i got judgmental. The seating arrangement was made in the basement cafeteria which boasted of an abominable stink. With the HR, busy, having her larger than life phone call, petty issues like collecting resumes, sorting them and then calling the candidates for interview were left to the guards. They created two groups according to the experience level, candidates with 3+ years of experience and candidates with less than 3 years of experience. Finally the concerned HR guy showed up. Took a few resumes and called the guys to first floor. Here, i was asked to wait for some time. This hall however did appear to be the waiting room of India's premier IT firm. Much to my relief. There were sofas, paintings and a terrace garden. Really what were they thinking when they zeroed in on the basement. Also, a few HR's were also running around looking busy. I had expected a long wait before my name is called upon as the hall was jam packed. Instead i was called pretty early. 

Round I:

No conference room again. I was simply sent to some guys desk. 
Q.1 Comparator vs Comparable?
Q.2 What are Collections?
Q.3 How many objects are there in a JSP?
Ans. 9
Overview: I totally failed to get this one. While i replied with session, application and config, i failed to put down the entire list. JSP also has a special object by the name of pageContext. The interviewer was pretty satisfied though. 
 This was followed by basic discussion of who i am and what i do (in corporate sense). All through the interview i observed a sulking demeanor in my esteemed interviewers attitude. Clearly, he did not like his job. Then he got personal and started asking why i want to switch and why i want to switch to a firm like HCL (no positive vibe was observed in his statement). Then came the grand confession. He was a former employee in my current firm. And though he moved to HCL he does acknowledges that HCL does not pay very well. To my horror he straightaway jumped to the discussion regarding package. I was expecting a package of 7, (my current package being 4.5). And for some strange reason i got real comfortable around him. Now i realize how funny it was, but right there i lifted my leg and crossed it over the other while sulking back in the chair. The guy did give me a disapproving nod but i just did not cared. Getting even more candid he came to the point. HCL does not gives 7 to a guy with less than 3 years of experience. At max i can get 6 but that's it and even that's highly unlikely. Then he took his feedback form. Wrote my skills over there and randomly scored me 2 and 2.5 in all of them. The marking was perhaps on a scale of 5.

Round II:

Finally some professionalism and a conference room.

  

Friday, 30 August 2013

One97 Communications Limited

Interview: One97 Communications Limited
Location : B-121, Sector -5 , Noida
Date : 20 August 2013
                Within a kilometer from Noida Sector-15 metro station. Got ripped by auto-wala. Paid him 40 bucks for getting from metro to the office. While returning i paid only 10 bucks for the same journey. Great way to start an interview.

Written test has three sections.
1. Aptitude
2. Java (objective type)
3. Programs and sql queries.

Aptitude:

1.  M N O
     M N O
     M N O
+   M N O
-------------
    P O N
-------------

Find the value of  M, N, O and P ? (And stop giggling on the double meaning.)

2. 
How many triangles are in this large triangle?
Ans.  543 (weird, huh. There is an entire blog post about how weird this question is...How many triangles in my cat?)

3. A murder took place after 10 pm at night. The lone witness recorded that the clock stopped at the exact time of murder. Later it was revealed that the hands on the clock remained on the same position, however their position were interchanged. What was the actual and claimed timing of the murder?

4. Find the next number in the series ( 1 2 4 13 81 122). (I am missing a number or two).

Lots of questions about how to tell the order of arrangement of items.
Example: 5 books are arranged on a shelf. A is next to B, C is between A and D and similar stuff.

5. In a game of chess i defeated "the only brother of daughter of my grandmother". Who did i defeat?
Ans. Father

Java

Very easy questions about boolean expressions, threads, garbage collection and inner classes.

Q.1 Which expression is same as (a>=b)
Ans.    !(a<b)


Programming

Q.1 WAP to sort an alphanumeric array of String.
   Example: {a1,j3,b2,v4} should be sorted to {a1,b2,j3,v4}.

Q.2 WAP to reverse the order of words (not characters) in  a character array.
  Example: cat boy bell bottle                      becomes                      
                 bottle bell boy cat

Q.3 WAP to print all absolute numbers between 100 and 999. Absolute numbers are those where left digit is always smaller than the right digit. Example: 345

Q.4 Suppose on facebook a user puts his status and then others comment on that status.
So, a situation like this evolves:

User 1 : My status 1
FB user 2: comment1
FB user 3: comment2
FB user 2: comment3
FB user 4: comment5

User 2 : My status 2
FB user 2: comment6
FB user 3: comment7

FB user 2: comment8

All this is stored in a table status_table as ID, Status, FB_User, Comment
Find the number of comments done by each user on a particular status.


Q.5 There are two tables

Customer (customer_id, name ,phone ,address)

Order(Order_id, date, customer_id, quantity)

Write a query to display the order of each customer along with his name and other details. Their may be some customers in customer table that do not have any order in order table. So, in front of their name, address, etc. their order details should all be displayed as NULL.

Wednesday, 7 August 2013

Snapdeal interview

Q.1 Difference between span and div?
Q.2 Create a page with rows and columns without using tr and td. Use only div and span.
Q.3 Difference between <br> and </br>.
Q.4 Ajax something.
Q.5 CSS.
Q.6 Difference between HTML 4 and HTML 5.
Q.7 Cross browser compatibility and how to check site functioning by comparing with w3schools.
Q.8 Block elements and inline elements.

Q.9 Class and block variables

Tuesday, 6 August 2013

Sirion Labs Interview

Sirion Labs
Interview:
Venue: Palm something, Gurgaon. Within 15 minutes ride from Sikandarpur metro station. Auto wala will charge around 50 bucks to land you straight up there.
Date : 3 August 2013
                    
Round I:
First round is Java basics. Well, not that basic. The questions keep getting twisty as you move through the paper. Some of them are plain silly. And yes, there are a couple of questions relating to data structures as well.
In total there are 16 questions.
No marking at all. They will simply discuss the solution to the answers. So be cautious about any guess that you make. In the interview they will discuss any question that you marked as wrong or any such question that turned out to be right in your case, but the majority got it wrong.
Questions of first round (in no particular order):

1.             class A
{
    public static void  X()
  {
          Y();
  }
  public static void Y()
  {
        System.out.println("parent");
  }
}

public class B extends A
{
        public void Y()
        {
                System.out.println("Child");
        }
}
What will the following code snippet print?
B.X() ?
Ans.
Explanation: From the first look it appears that either Parent or Child will be printed. But, there’s a catch. All the methods are static and static methods cannot be overridden as they are properties of class.

2.    try
{
   int a = 5;
   System.out.println("Try");
}
catch(Exception e)
{
    System.out.println("Exception is ="+a);
}
What will be printed on running the above code snippet?
Options:
A)     Try
B)      Exception
C)      Run time error
D)      Compile time error
Ans. D) Compile time error
Explanation: You may spend a lifetime trying to figure out what’s wrong with the above code and still write A with an uneasy feeling that something is definitely amiss, maybe I am just overlooking it. Your gut feeling is correct. Something is amiss. But it’s just silly. Did you notice that the variable ‘a’ is being called in exception block while its scope ends in ‘try’? See, it’s silly. The code will simply give a compile time error.

3.   A very long question. First it lists the definition of in order, pre order and post order traversal. It refers to post order as reverse order. Whoever came up with that? Then it innocently gives the pre order traversal of a tree. ABCDE. As expected, the question asks to come up with the corresponding in order and post order traversal.
Options:
A)     CBDAE, CDBAE
B)     Insufficient data, CDBAE
C)     Insufficient data, CABDE
D)     Insufficient data, insufficient data
Ans.
Explanation: This question can have two possible answers.
In option A if we consider the in order traversal ‘CBDAE’ as part of the question then CDBAE is indeed the correct post order traversal. Hence, A is correct.
Both, B and C are incorrect because we cannot find the post order traversal without knowing both the in order and pre order traversal.
D can also be correct as only pre order traversal cannot give us both the post order and in order traversal.

4.         String a = null;
    String b = "xyz";
    String c = a+b;
    System.out.println("c");
   
What will be the output on running the above code snippet?
Options:
A)     xyz
B)     nullxyz
C)     Complie time error
D)     Run time error

5.   public int method(int n)
    {
        int result = 0;
        n <<= 1;
        while (n > 0) {
            result += (n / 2) % 2;
        }
        return result;
    }
The method is called as method(13977) or some very large odd number. What will the method return in the variable result?
Ans.
Explanation: N<<=1 simply multiplies N with 2. It is equivalent of n*=2.

6.   The entire code for reversing a link list. They just removed the initialization part and the part inside the loop. You have to write that part.

7.  int result =0;
   for (int i =0; i< 10; i++)
   {
       for (int j=0; j<10; j++)
       {
              result+=i+j;
       }
     }
     What will be the value of result?
Ans.
Explanation: The catch in this question is that i+j will be calculated after result+=i is calculated so result will eventually be ∑(10*i) i.e. (10*0+10*1+10*2…….+10*9).

      There were 9 other questions. Most of them, related to inheritance.

Round II
All the questions were related to algorithms. You can choose any language you wish.

1.   There is a 2-D matrix of 0’s and 1’s.  Given a 2D array of 1's and 0's, find the size of the largest block of 0's. For example the following 2D array:
int[][] array = {
                     {1, 0, 1, 0, 0, 0, 1, 0 },
                     {1, 0, 0, 0, 0, 0, 1, 1 },
                     {1, 1, 1, 0, 0, 0, 1, 1 }
                     };
Will return "9", because there is a 3x3 square of 0's, and that is the biggest block of 0's in the 2D space.

2.   Find the largest distance between two nodes in a binary tree.
The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two leaves in the tree. The diagram below shows two trees each with diameter nine, the leaves that form the ends of a longest path are shaded (note that there is more than one path in each tree of length nine, but no path longer than nine nodes).
The diameter of a tree T is the largest of the following quantities:
* the diameter of T’s left sub tree
* the diameter of T’s right sub tree
* the longest path between leaves that goes through the root of T (this can be computed from the heights of the sub trees of T)

Interview:
1.   Implicit objects in JSP?
2.   What happens if destroy() is called on a servlet object?



       

Sunday, 28 July 2013

Amazon interview

Q.1 Sort a link list of 0's, 1's and 2's. Or something similar.
Q.2 Find the second smallest number to a given number in a tree.
Q.3 

Belzabar interview

Q. Find median of two sorted arrays?

Blackrock interview

Q.1 How to use Comparator with collection?
Q.2 What is a serializable object? How to use it? When is it used? Is it used over networks?
Q.3 What are immutable objects?
Q.4 What is the big deal with java 1.5?
Q.5 If HashTable was always there, why come up with a HashMap?
Q.6 SQL query to get the second largest element in a table?

hCentive interview

Lots of questions about enums and static imports.
How to intialize Locale.

Intelligrape interview

Section 1
Q.1 WAP to print the sum of characters in a String. Assuming that A=1, B=2, C=3.....So DAD will be 4+1+4=9.
Q.2 Make a HashMap for the class Student.
class Student
{
String name;
Date dateOfBirth;
Integer fees;
}
Q.3 Given a series :
GGG
RRR
BBB
Convert it into:
GRB
GRB
GRB
Q.4 Given an array of positive, negative and zero's. Arrange the array such that all negative numbers are on the left, zeroes in the centre and positive numbers in the right.

Section - 2
Q.1 Create a database(tables) for the given relationship. Do not draw ER diagrams.
A group may have many challenges. A challenge can have many users. A user can have many challenges.



Sonata interview

Sonata
Q.1 Tell me about your project?
Q.2 Design patterns (structural, behavioural)?
Ans. Business delegate  and MVC are incorrect answers.
Hint# Related to JavaEE
Q.3 Best sorting technique?
Q.4 Space and time complexity of merge sort?
Q.4 Where does log (n) comes in merge sort?
Q.5 Why is public satic void main(String args[]) so?
Q.6 What if we change pulic to private or protected?
Q.7 Why is main static?
Q.8 Could the return type of main be int?
Q.9 Scope of beans?
Ans. Singleton, prototype, global, etc.
Q.10 How to define singelton bean without sring framwork?
Q.11 Can we have setter and constructor injection?
Q.12 What is inversion of control, Spring ?
Q.13 Can we have two items.xml files in a project?
Q.14 Can we have two spring.xml files in a project?
Q.15 What is the tag by which we create a relationship between two id's/components in an items.xml files?
Q.14 How many extensions are there in hybris? How many have you worked upon?

Unicommerce interview

Unicommerce interview.
URL: http://www.unicommerce.com/

Date : 27 July 2013
Venue : Okhla Phase 3, New Delhi, India

Round 1 (Aptitude):
15 question. 45 minutes.
Objective questions. However, there is no strict marking scheme. Any guess made will be questioned in interview.

Q.1 If a>b implies 1/a<1/b, the which is true?
A) a>0 
B) b>0 
C) a>0 and b>0 
D) none of the above

Q.2  There are 25 horses in a race. Find the minimum number of races to find the three fastest horses. Each race can have 5 horses.
A) 12 
B) 7 
C) 9 
D) 5
Ans. 7.
Explanation:
First perform 5 races to find the top 5. Total races = 5
Then perform a race to find the fastest horse. Total races = 6
Now discard the original buckets of 2nd, 3rd, 4th and 5th horse from the 6th race as they can never give top three fastest horses and we already have the fastest horses from these pool. Also, discard the 4th and 5th horse of 6th race.
So, we are left with four horses from the pool of winner of 6th race and the second and third of 6th race i.e. total of 6 horses.
Now either the 2nd and 3rd of 6th race are the 2nd and third fastest or the 2nd or 3rd of the winner of 6th race are the 2nd and 3rd fastest.
So, discard the 4th and 5th of the original bucket of winner of 6th race.
Now, we are letf with only four horses. 2nd and 3rd of 6th race and 2nd and 3rd of the original bucket of winner of 6th race.
Perform a race of these four horses and get the second and third.               Total races = 7

Q.3  Find the total number of squares that u can draw in a chess board?
Ans. 204
Explanation: 
        Consider the lefthand vertical edge of a square of size 1 x 1.  
This edge can be in any one of 8 positions. Similarly, the top 
edge can occupy any one of 8 positions for a 1 x 1 square.  
So the total number of 1 x 1 squares = 8 x 8 = 64.

For a 2 x 2 square the lefthand edge can occupy 7 positions and 
the top edge 7 positions, giving 7 x 7 = 49 squares of size 2 x 2.

Continuing in this way we get squares of size 3 x 3, 4 x 4 and so on.

We can summarize the results as follows:

   Size Of square      Number of squares
   ---------------     -----------------
      1 x 1               8^2 = 64
      2 x 2               7^2 = 49
      3 x 3               6^2 = 36
      4 x 4               5^2 = 25
      5 x 5               4^2 = 16
      6 x 6               3^2 =  9
      7 x 7               2^2 =  4
      8 x 8               1^2 =  1
                      ---------------
                      Total   = 204

There is a formula for the sum of squares of the integers 
1^2 + 2^2 + 3^2 + ...  + n^2

                n(n+1)(2n+1)
         Sum  = ------------
                     6

In our case, with n = 8, this formula gives 8 x 9 x 17/6 = 204.

As an extension to this problem, you might want to calculate the 
number of rectangles that can be drawn on a chessboard.

There are 9 vertical lines and 9 horizontal lines. To form a rectangle 
you must choose 2 of the 9 vertical lines, and 2 of the 9 horizontal 
lines. Each of these can be done in 9C2 ways = 36 ways. So the number 
of rectangles is given by 36^2 = 1296.

Q.4 How many knights can u place on a chessboard such that none of them attacks the other?
Ans. 32

Q.5 Find the next number in the series.
6, 15, 35, 77, 143, ___
Ans. 221
Explanation: 
6 = 2*3
15 = 3*5
35 = 5*7
77 = 7 *11
The pattern is that the terms are products of two prime numbers and where one of the prime numbers increases to the next one in the following term Hence:
11*13 = 143
13*17 = 221 etc

Q.6 How many zeroes are there at the end of 1000! (1000*999*998*......3*2*1) ?
Ans. 248
Explanation:
We wish to find the number of zeros at the end of 1000! = 1000*999*998*997*....*4*3*2*1
We examine the factors of 1000! to see which can be used to produce multiples of 10.
For 1000!, each multiple of 5 - taken together with some even number - contributes a multiple of 10. Each multiple of 25 - taken together with some multiple of 4 - contributes two multiples of 10. Each multiple of 125 - taken together with some multiple of 8 - contributes three multiples of 10.
We can count each multiple of 5 in 1000! once. Then we can count each multiple of 25 in 1000! once in order to altogether count each multiple of 25 twice. Then we can count each multiple of 125 in 1000! once in order to altogether count each multiple of 125 thrice.
There are 1000/5 = 200 multiples of 5 in 1000!
There are 1000/25 = 40 multiples of 25 in 1000!
There are 1000/125 = 8 multiples of 125 in 1000!
Adding them together, we have 200+40+8 = 248 zeros at the end of 1000!.

Q.7 There are 3 Englishmen and three french in a company. Each of them holds a secret. They can tell the secret on a one-on-one telephonic conversation. At the end of all the conversations each of them must know all the six secrets. Only one Englishman knows french and none of the french knows English. How many minimum calls are to be made?
A) 5
B) 9
C) 10
D) 15
Ans. C) 9
Explanation:
1: Englishman 1 calls the guy who knows french, and tells his secret
2: Englishman 2 calls the guy who knows french, and tells his secret
3, 4: The guy who knows french calls two of the Frenchmen and collects their secrets
5: The guy who knows french calls the last Frenchman and collects his secret (thus gaining all the secrets) and tells the Frenchman all the secrets he knows (so the Frenchman has all the secrets).
6-7: the Frenchman calls his fellow Frenchmen and discloses all the secrets
8-9: The guy who knows french calls his fellow Englishmen and discloses all the secrets.

Q.8 Akshay Kumar is standing in a tunnel(PQ) at a distance of x/4 from P. The total length of the PQ tunnel is x.  A train is approaching the tunnel from P. Currently it is at a distance of y from P. It is running at a speed of 60 km/hr. If Akshay can run at his maximum speed to just save his life, what is the maximum speed of Akshay?

Q.9 There are two beakers A and B. A contains 1000ml of milk and B contains 1000 ml of water. If 100 ml of milk from A is added to B and then 100 ml of liquid from B is added to A. Which of the following is true?
A) Percentage of milk in A > Percentage of water in B
B)  Percentage of milk in A < Percentage of water in B
C)  Percentage of milk in A = Percentage of water in B
D) None of the above
Ans. C
Explanation : On solving the percentage of milk in A and water in B come out as 91%.

Q. 10 An object is marked at MRP p. Which of these two  options will result in a lower price for customer?
I) First give a discount of x% on p. Then add a tax of y% on the result.
II) First add a tax of y% on p. Then provide a discount of x% on the result.
Ans. Both will result in the same final price i.e.  p(1-x/100)(1+y/100)

Q.11 A car travels at 40 km/hr from Delhi to Gurgaon and comes back at 60 km/hr from Gurgaon to Delhi. What is the average speed of car during the entire journey?

Q.12  In the following grid assign the numbers 1-8 such that no two numbers that are adjacent in numeric series are adjacent in the grid (vertically, horizontally and diagonally). For example the below solution is incorrect.
X 1 X
2 3 4
5 6 7
X 8 X
Ans.
X 7 X
3 1 4
5 8 6
X 2 X

Q.13 There are 1000 bulbs in a room in off state. Turning the switch will put them in on state. In first pass all the switches are turned. In second only the switches that are multiples of 2 are turned and so on ..... After the 1000 pass how many switches remain on?
Ans. No of primes < 1000


Round 2 (Face to face interview):
Q.1 Explain the solution of question number 4.
I had accidentally solved it thinking they are asking about rook not knight (and marked 8 as my answer). Corrected my mistake and gave this design.

k k k
k k
k k k
and so on i.e. putting knights after leaving a block which gives us 64/2 = 32 knights.

Q.2 Detailed explanation of Q.2 (horse racing).
Like me everybody has simply guessed that one. So it was pretty much 'catch of the day' for the interviewer. I did notice a smirk when he asked me. Ans i did get busted. Then,i tried my level best, but reached only up to finding top 2 fastest horses. Mr. Einstein then explained me the answer. This one took a lot of time.

Q.3 What do u do in your company. What does your company do?
For no apparent reason i started babbling. He got the hint and completed the sentences for me. While i kept quoting Spring and Hybris and other heavyweight technologies he simply translated them as 'Oh!!! Servlets, Controllers and JSP's. Okki". And frankly he was looking for a lot less. All he wanted was somebody that knew core java. Call me pessimist but at this point i knew it's over.

Q.4 How did you find the written test.
Me.  I was looking for Java so this was quite a surprise.
          Yeah, don't you know that i am the inventor of Java. How dare dost thou asketh me these petty questions.

Q.5 Why is String immutable?
Explaining the entire history of StringBuffer and StringBuilder did not cut any ice. Saying that since all the primitive types and there corresponfing wrapper classes are immutable as well so String was made immutable to give it a primitive like 'look and feel', was not much correct as well. Later, he explained that if it were not immutable how would you create a pool of String. It had something to do with saving heap space and getting it thread-safe. I am still working on finding the semantic meaning of that sentence.

Q.6 What is serializable. When do you use it. How do u serailize and deserialize an object. Do you use toString()  to Serialize an object?
Explained that serializable is used to bring objects in a persistance state so that they maybe written in a file. You can serialize by implementing the Serializable interface. Using toString() will simply return a String <Class Name>@<hashcode>, so there must be another mechanism.

Q.7 Sensing that i am faltering he asked what Database do i use.
Me. Actually there is no such database. We push data in the data base 'Endeca' from hybris using cronjobs like partial update and baseline update. Hybris also has a database of its own that stores some information.
Listening to even more heavyweight words confirmed his earlier premonitions. Now he had an active dislike in my candor. It was only a matter of minutes now.

Q.8 What are the collections available in Java?
Me. List, Set, Map...

Q.9 Difference between List and Set?
Me. Set has all unique elements while List may have non-unique elements.

Q.10 How does Set check if we are adding unique elements?
Me. Inside there must be a loop.
Him. But how?
Me. It compares and finds if the element already exists.
Him. But how does it compare the class that i just created say 'Student'?
Me. It should be having generic coding inside i.e. using <T> and that <T> will get replaced by Student at run time.
Him. But how does it do that?
Me. It must be having a check == or equals() to compare.
Him. Which one?
Me. == checks if both the refrences are pointing to the same object and equals() compare the values or whatever we override.
Him. So which one?
Me.Ummm.....welllllll.....................aaaaaaaaaaaaaaaa...................hashcode..........something something.....................ummmmmmmmmmm
Him. Oki if hashcode() comparison of two references returns true  does that mean they are equal?
Me. No. if hashcode() returns true then the two references may be equals/ may not be equal but if it returns false, then equals() will return false for sure.
Him. Then why not use simply hashcode() comparison. Why go for equals() ?
Me. Totally blank face.
Can't believe it started from something as innocent as Set.

Q.11 What are the conditions/ restrictions on overriding a method?
Me. The child class must have the access specifier that is less restricitve or same as parent method. Example if parent class has its method specified as protected, then the child class can make it either public or protected.
Him. Why is that? Why not more restrictive?
Me. After thinking the hell out of my brain. When you override a method you make a refernce of parent type. Initialize it with the object of child type and then call an overridden method using that reference. Now, if it were more restricitive. Then  calling the overridden method would result in an exception.
Him. During runtime or compile time?
Me. During runtime. That's when overriding comes into play.

Q.12 You work on Spring. Right?
Me. Aye. I do.
Him. All that controller and servlets. Okki. So if you define a global variable,which acts as a counter in your servlet and 50 requests are made to that servlet then what will be value of that counter at the end of all the requests. All requests are coming simultaneously.
Me. That vaiable is static. Ain't it!!
Him. Does that even matter?
Me. Yeah. Coz the servlet will make multiple threads.
Him. But the object will still be the same. Isn't it. The container creates one object for a servlet and then that servlet can have many threads sharing the same variable space.
Me. Then we can't say what will be the final value as it is not thread safe.
Him. What can we do to make it thread safe?
Me. Put it into synchronized block.
Him. Any other method?
Me. No idea.
Him. Actually there is a keyword atomic which puts the variable in locations which are thread safe.

Q.13 Anything you wanna ask me ?
Me. What is unicommerce?
Him. ITs a company founded around 1.5 years ago. We provide services for inventory management and eommerce.
Thanx.
Now comes the final nail in my coffin.
Soooooooooooooo, we will contact you later.
I know. I have heard it many times.