Feeds:
Posts
Comments

Archive for September, 2012

Pegasystems ask questions mainly on Java, for me following questions were asked during interview.
1.  Operator overloading presents in Java or not . Explain more about this.

2.  Overriding, how do you achieve polymorphism in java?

3.  String and Stringbuffer.

4.  Inner class and outer class concepts.

5.  Inheritance in Java: Given a programming problem by deriving class from  B to A .

6. Abstract class and interface: relate them and give a real time scenario.

Read Full Post »

I’ll edit about this today

Read Full Post »

I’ll edit today about this….

Read Full Post »

Interview with Amazon

No need to explain about Amazon……….

They have asked three questions and I have failed that time to answer them correctly.

Q1.  Write a program for finding maximum sum path from a Tree from leaf to Root from Binary Tree (Not a BST).

Ex.                                                                   (10)

/                       \

(12)                       (15)

/           \                   /         \

(16)         (17)         (5)          (8)

Result should be:  17 – 12 – 10

Q2. This question is really tough, i have tried but not achieved till now, please try to understand if you will not then let me know i’ll give more explanations.

In a given array, each element represents steps to move forward, now you have to find minimum elements to cover whole array.

Ex:  Array : {1, 3, 5, 8, 9, 6,7,5,9,1,11}

So the array’s length is 11. Traverse the array

1 so from 1 pointer can go only one step.

So it will reach 3 now from 3 pointer can move 5, 8, 9

now 5 can move 5 to 8, 9, 6, 7, 5

and from 8 pointer can move 9,6, 7, 5, 9, 1,11 it covers whole array.
So minimum hops will be 1 -> 3 -> 8

So you have to write a program fro finding this optimum path.

Missed: If 0 (Zero) occurs pointer can’t move forward.

Q3. it was simplest one: write a program for finding pair of sum from a given array for given sum.

Ex: Array : {2,3,4,1,5,6,0}

Sum = 6;

Results should be: (2,4), (1,5), (6,0)

Solve these and post it….happy coding.

Read Full Post »

Wallmart Labs:  Through the innovative fusion of retail, social and mobile, @WalmartLabs is redefining Commerce for the largest retailer worldwide. We are a group comprised of the brightest technologists and businesspeople in the industry, excited about the limitless opportunities that this next generation of Commerce will bring to billions of people around the globe, all in an effort to help them save money and live better.

Date: 01 Sept, 2012
Best experience ever, they have asked so many questions.

1. write a program for finding duplicates from a array in O(n) complexity.

2. write a program for find nearest perfect square of given number.

Ex. number is given 13, then nearest perfect squares are 9 and 16. Then answer should be 16 because 16 is nearest to 13.

3. write a program for add two numbers without using mathematical operations.

Hint: you can use bit-wise operators, like : XOR, AND and OR.

4. How many types of contract do you use for web services.

5. If i want to avoid the execution of finally, what we can do ?

6. Singleton pattern in Java, how will you achieve singleton.

7. Write a query for second maximum in SQL.

8. Performance tuning or Query Optimization techniques in Java.

9. How will you create non-concrete (Which can’t be instantiate) class.

10. Indexing in SQL. Types of indexing and how will use it.

11. Significance of final keyword in Java.

12. Significance of static keyword in Java for methods and variables.

13. Which protocol do you use for web-services and web-server.

14. Architect data structure for 10 million records, where the records are totally RAW (can be string or numbers).

15.  Abstract class and final class.
Interview went good..lets see the results.

Read Full Post »

UrbanTouch.com serves an essential human need – to look beautiful. We offer only the best and biggest brands so you can remain assured of the quality of every item we sell. We aim to provide you an incredible shopping experience, a wide range of brands and excellent customer service.

Interview went good:
The only one question they have asked,

Q1. write the implementation of String trim function. trim removes the spaces from start and end of string.
Program should run in O(n) and it should be optimum.

 

Read Full Post »