Wednesday, September 27, 2017

Interview questions to review

Digit to word converter 
http://javahungry.blogspot.com/2014/05/convert-math-number-to-equivalent-readable-word-in-java-code-with-example.html 



file - find and replace string in file 
large file , moving files scrolling

Very Common interview questions- must know
Merging k sorted list or arrays
Search in dictonary for a word
How will you implement dictonary
find i, j and k where i2 + j2 = sum2
find i, j and k where i + j = sum
find 2/3 element whose sum is close to zero
Sort array of 0 and 1 or 0 , 1 and 2
String anagrams
Permutation of string
First repeating/ Non repeating charactor
external sorting , counting sort, bucket sort and radix sort questions
quicksort, heapsort and mergesort
topological sort
BFS, DFS
left, right, bottom, top view of the binary tree

Longest common substring
longest common subsequence length
longest palindrom substring/ subsequence



Subex interview

Company Name - Subex
Data - Aug, 2017
Rounds - Face to Fcae

Round 1 -
Core java full

Round 2
1. what happens if you import multiple jar files having same class structure(fully qualified name is aame)
2. what java version you use
3. immutable classes other than string
4. stock problem - find maximum profit of buy and selling
5. Singleton

Apponomic Interview

Company Name - Apponomic 


Date - 25 - 9 - 2017

Round - 1st Telephonic

Questions -

1. Suppose you want to repeat a time in every 5 hours, How you will achieve it in multi threading.
(using Timer Task )
2. what does volatile keyword do and how 
3. Difference between synchronized and volatile
4. how we make sure a method does not accessed by more than 10 threads at a time
    ( newFixedthreadPool(10), call submit() )
5. can static method be synchronised. what happens when you put sync keyword in static method
6. how to synchronised a method using multiple blocks 
( divide in multiple blocks and use lock object) 
7. what is hashcode()
8. internal working of hashmap
9. A global counter variable - should be accessed by multiple threads and give proper value
    (take atomic variable) 
10  Questions on java.util.concurrent package like below
11. problems in hashmap
12. How concurrenthashmap works
13. how concurrenthashmap achieve multiple concurrency level
14. what all collections you used
15  what is queue and about priority queues
16. how to check if binary tree is BST or Not
17. difference between interfaces and abstract classes
18. LRU cache implement

Accolite Interview

Company Name - Accolite Bangalore

Date - 25 - 9 - 2017

Round - 1st Telephonic, questions are mostly in Java

Questions -

1. Internal working of HashMap
2. Cycle detection in LinkedList(Floyd algo)
3. Overriding Static methods in Java - no overriding in static methods, will be called as per object ref.
4. Overridign methods in java - derived method will hide base methods
5. Overriding variables in java - Not possible we simple get base variable

Examples -
class Parent{ int x, void method() { }}
class Child extends Parent { int y, void method(){ }}

Parent p = new child();
sysout(p.x) // ok
sysout(p.y) // CE
sysout(p.method()) // method in derived class

imagin method in decleared static in base or child any - Now its not overridden
p.staticmethod() // calls to parent class method since object decleared as parent class


6. Public Static Void main(String [] arg)
6. What if you change public and static place - No problem
7. What if you change return type of main method(it will be overloaded, give us RE- Main method not found)
8. try , catch , finally - remember finally always get called)
9. immutable classes
10. clone method (deep and shallow copy)
11. Two way hashmap design

Sapient Interview

Company Name - Sapient Corporation

Date - 20 - 9 - 1017

Round - 1st Telephonic, questions are mostly in Java

Questions -


1. OOPS concepts and examples
2. Solid principles ( SOLID)
3. Singleton, (write code using volatile and double checking of null and explain why use double checking),
4. how to break singleton pattern (reflextion, serialize , overriding clone method)
5. Tell me about enum
6. Expection heriercy and how to create custom exceptions
7. Immuatable class , why, how you write immuatable classes
8. Deep and shaloow copy in cloning (differnce and effect in immutable classes if we use shallow in place of deep copy)
9. how set internally implemented ( set is internally implemented using map , and in place of value , it uses random object)
10. which all design patterns you know(singleton , adaptor, factory, observer, decorator, builder are common ( must know 2 -3 and example in code )
11. What is Marker interface (Interface with not method) ,
12. Why we need marker interface when it has no method
13. Static method override (We don't actually override them)
14. JDBC working steps
15. Java Generics - Example of what happens if you don't use generics
16. hashcode() and equals() methods, why we need to override equals
17. Comparator Interface in java
18. Write program to check if Number/String is palindrom or not
19. Take bank account, design system where person has multiple accounds in Same bank

Ericsson Interview

Round 1 : mostly Java 1. SingleTon - In multiple servers in a culstered envirnment. 2. HashMap put method internally, how that works 3....