OpenText interview question

First Round (2 hrs) Write an executable program for string permutation. What is time complexity for the question above? What are anagrams? Logic find if two strings are anagrams or not. What are the approaches for finding set of anagrams from an array of multiple strings? The string array may have strings that may not be an anagram too. Write a program to insert and retrieve details from a hash map. Hash map with custom keys and values. How will the JVM store values in hash map. Write the custom objects - employee, emplDtls for hash map to with properly. How does hash map work? How to avoid performance hits in hashing? What is the performance hit, in the first place? How does bucketing work? What if multiple aspects have same hashcode? How well bucketing happen? What are generics and type safety? In jdk 1.4, list does not have type check, but 1.5+ has. If we pass a list<string> to list(), it works. It also allows to add an integer to this list (). How is that possible? It should fail but it's working. What is the point in writing the type safety? Why do we need threads? Difference between threads and processes? What is allowed in the following and why? Class c { synchronized public static m1() {...} synchronized public m2() {...} synchronized public m3() {...} } C c = new C(); a. Thread1.m1() and Thread2.m2() b. Thread1.m2() and Thread2.m2() c. Thread1.m2() and Thread2.m3() What happens to other threads when a thread executes a synchronized static method? What is volatile? Explain the significance of volatile variable in a single CPU, single cache system. Difference restful web services and servlets? How rest is advantageous over servlets? Give example. Design a library management system. Define their entities and write actual tables based on their relationship. Second Round(45 mins) Create ER diagram for an e-Commerce website. Write a query to get all customers who bought at least 10000 worth goods in each quarter. Example of an observer pattern Implement queue using stacks. Third and Fourth Rounds were Manager Rounds (40 mins each) Asked questions about team handling, scrum based scenarios with respect to resources. Different scenarios related production support. basically wanted to test my team playing abilities.