Walmart | Software Engineer II | Bangalore/Chennai [Reject]
Anonymous User
1452

Round 1:

Java:
1)String str=new String("5");
String str2="5";
What will str1==str2 return?why?
2)Encapsulation-use?,code
3)Inheritance-code
4)Overloading-code
5)Runtime polymorphism-how?,code
6)Multithreading:
write a program with two threads..One thread has to print only the odd numbers from 1 to 10,the other thread has to print the even nos from 1 to 10
7)When to use interface and when to use abstract class.How does abstract class differ from normal method?

SQL:
Given a Table 'weather' with attributes 'date' and 'temperature'.
Write a query to retrieve the dates for which the temperature on the right next day to that day is greater than that date.

date |temp
5th sep |30
6th sep |28
7th sep |30
8th sep |25
9th sep |26

The query on this table should return:
6th sep
8th sep

Problem Solving and datastructures:

Linked list:
1)Reverse the linked list(without extra space)(without using stack)
2)Detect and remove the loop from the linked list if any exists(expected optimal solution)
What problems could this loop cause?
3)Given an array of integers.Find pairs such that the sum of the elements of the pair is also an element in the array(expected optimized solution)
4)Given an array of integers.Find pairs whose elements sum to 3(expected optimized solution only)

Comments (2)