Interview Questions and Answers for 'Microsoft' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Microsoft' - 11 question(s) found - Order By Newest

Basic and Very Frequently asked.
  Q1. What is Polymorphism in Java ?Core Java
Ans. Polymorphism means the condition of occurring in several different forms.

Polymorphism in Java is achieved in two manners

1. Static polymorphism is the polymorphic resolution identified at compile time and is achieved through function overloading whereas

2. Dynamic polymorphism is the polymorphic resolution identified at runtime and is achieved through method overriding.

  Sample Code for overloading

  Sample Code for overriding

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     polymorphism  object oriented programming (oops)  oops concepts  oops concepts     Asked in 108 Companies      Basic        frequent

Try 2 Question(s) Test


Frequently asked in Cognizant (CTS)
  Q2. What is Serialization ? Why do we need it ?Core Java
Ans. Storing the state of an object in a file or other medium is called serialization.

Classes can communicate only if they are built together ( as they need Byte code for communication ). What if we need to enable communication between different applications ( i.e they have been built independently or even they reside at different locations ), We need a mechanism that will transfer the Bean state to a Medium than can be transferred to the receiving application.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   serialization     Asked in 18 Companies      basic        frequent

Try 1 Question(s) Test


Frequently asked in high end product companies.
 Q3. Write code for LRU CacheCore Java
Ans. https://www.geeksforgeeks.org/lru-cache-implementation/

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     cache  LRU cache  coding  code     Asked in 10 Companies      intermediate


 Q4. Write a Program to remove duplicate words from the StringCore Java
Ans.
public class BuggyBread {
public static void main(String args[]) {
String str = "we are what we repeatedly Do excellence, then, is not an act but a haBit";
Set<String> wordSet = new LinkedHashSet(); // Using Linked Hash Set as we would like to retrieve words in the insertion order

for(String word: str.split(" ")){
wordSet.add(word);
}

for(String word: wordSet){
System.out.print(word);
System.out.print(" ");
}
}
}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     String  coding  code     Asked in 1 Companies      basic


 Q5. What data structure will you use if we have to search an element in million of elements ?Data Structure
 This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Search     Asked in 1 Companies


 Q6. Check if tic tac toe has a winnerAlgorithm
 This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q7. Explain different sorting algorithms and Big O of eachAlgorithm
 This question was recently asked at 'Microsoft,ServiceNow'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q8. Write a program to find loop in a linked listAlgorithm
 This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


  Q9. Find Intersection/union between two arrays.Core Java
 This question was recently asked at 'Bristlecone,Amazon Lab126,Amazon,Microsoft,Facebook,NCR,Google'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     arrays  code  coding     Asked in 7 Companies        frequent


  Q10. Difference between == and === ?JavaScript
Ans. == compares values === is used in scripting languages for comparing two values as well as there data tpe. like in js,php.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     ==  ===  == vs ===     Asked in 13 Companies      basic        frequent


 Q11. Could you walk me through and draw out a sketch of a recent architecture project you completed ?architecture
 This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     design     Asked in 1 Companies



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: