Sunday, July 9, 2017

SAPIENT GLOBAL MARKET INTERVIEW PATTERN


Position - Technical Lead - 4 to 9 Yr Experience

Skill Required Java/J2EE/JMS/Multithreading/Collections/Design Patterns/Design Principles etc

It started with first round which was a coding round on Eclipse IDE. You have to make a running application based on problem given to you. Separate marks for correct Junit test cases.

Total time – 2.5 HR

Coding Exercise Evaluation Criteria
1.      Code Completeness/ Correctness
2.      Code Structure and quality: Modularity, usage of OO principles, size of classes/functions,
3.      Choice of data structures
4.      Unit Test cases
5.      Coding productivity (more time you take to submit the exercise, lesser you will score)
6.      class/function/variable names, package/class structure

Your program will be evaluated and if cleared, you’ll go through first round and move to second round. I'll share the question along with my implementation in next post.

Questions asked in Second round :

     1)     What is Enum in java? Why Enum has been introduced and what are the advantages of Enum over normal class?

     2)     How to sort a HashMap based on keys.
     
     3)     Hibernate
a)     NamedQuery in hibernate.
b)     L2 Cache. Real time use cases of L2 cache.
c)     Cascade and Inverse in hibernate.↓
d)    Fetch types in hibernate.
e)     Transaction module. How transactions work in hibernate.
     
      4)     How to find 3rd maximum salary from an Employee table with ID, SALARY and NAME in it.
      
      5)     Are you using Scrum / Agile / Waterfall in your project. Intention is that you should’ve fair idea of these methodologies.
      
      6)     List A =[1,3,5,7]
                ↑   ↑
List B = [1,  3]; specify position of list A
Write a program to remove position 1 and 3 as mentioned in List B from List A
Output
[3, 7]

Explanation – Removing position 1,3(List B) from List A, so position 1 in list A is 1 and position 3 from List A is 5 . Removing both give us [3, 7]

      7)     Output of below programs:

What will happen when show() is called.

public class TestException {

          static int show(){
               try{
                   return 1;
               }
               finally{
                   return 2;
               }
          }
}

   8) Extension of Q7, What will happen when show() is called.

static int show(){
          try{
              throw new NullPointerException();
          }
          finally{
              return 2;
          }
}
     
     9)     If suppose there are two threads t1 and t2. There is a shared resource list e. How to make sure that thread t2 update the shared resource list first and then only thread t1 manipulate it.

    10)What is composition in java? Difference between Encapsulation and Abstraction.

    11)What will happen when below code runs?

public class TestFinal {
     public static void main(String[] args) {
          final Integer[] array ={1,2};
          System.out.println(array[0]);
          System.out.println(array[1]);
          array[0]=10;
          System.out.println(array[0]);
     }
}


Most Important topics
     a)     Concurrent package introduced in jdk5
     b)     Spring and Hibernate basics
     c)     Rest Web services

   Feel free to ask anything regarding interview or about the company. Happy Coding !!

4 comments:

  1. Thanks for this post . Could you also please share the question in the first round ?

    ReplyDelete
    Replies
    1. Welcome :) Sure, I'm writing a post along with my implementation in later post. Stay in touch

      Delete
  2. Thanks for this post. Please share coding question asked ?

    --- Awaiting for the same

    ReplyDelete
  3. Have u posted the coding question? could you please share link?

    ReplyDelete