An online test on java/ajax & struts
1) How would you implement snakes and ladder game?(Hint: Use arrayList)
2) How would you come to know if a number is a power of 2? Code.
3) Given an arrayList, get the number which is lonely or does not have any duplicates. What is the time complexity here.
4) How will you implement a functionality where updating the DB updates the value on the UI without entire page refresh
1) Consider a square matrix with elements 0s & 1s in it. The rows are sorted while columns are not. Calculate the row with the maximum sum. (Hint : you don’t need to iterate through all the rows & columns to get the answer)
2) Consider an array:
[1,2,5,6,5,2] Get the index of the element which is : at-least repeated once & has the lowest index. Output for the above given array is : 2
Explanation : Since both 2 & 5 are repeated elements but since the index of 2 is less than that of 5, hence the answer is 2.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.