 
| 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. | 
| 
 | |||
|  | ||||
| Interview Questions and Answers for 'Makemytrip' - 5 question(s) found - Order By Rating | ||||
|  Very frequently asked. Favorite question in Walk in Drive of many Indian service companies. | ||||
| 
 | ||||
| Ans. They are different the way their elements are stored in memory. TreeMap stores the Keys in order whereas HashMap stores the key value pairs randomly. | ||||
|  Sample Code for treemap  Sample Code for hashmap | ||||
|  Help us improve. Please let us know the company, where you were asked this question  : | ||||
|  Discuss  Correct / Improve   java   collections   map   treemap   hashmap   treemap vs hashmap  Asked in 31 Companies  basic       frequent | ||||
|  Try 1 Question(s) Test | ||||
| 
 | ||||
| Ans. private static boolean isPalindrome(String str) { if (str == null) return false; StringBuilder strBuilder = new StringBuilder(str); strBuilder.reverse(); return strBuilder.toString().equals(str); } | ||||
|  Help us improve. Please let us know the company, where you were asked this question  : | ||||
|  Discuss  Correct / Improve   java   string   stringbuilder   stringbuilder   string class   code   palindrome  Asked in 38 Companies  Basic       frequent | ||||
| 
 | ||||
| Ans. ConcurrentHashMap is a hashMap that allows concurrent modifications from multiple threads as there can be multiple locks on the same hashmap. | ||||
|  Help us improve. Please let us know the company, where you were asked this question  : | ||||
|  Discuss  Correct / Improve   java   collections   hashmap   map   concurrenthashmap   concurrenthashmap  concurrency   general electric   ge  Asked in 32 Companies       rare | ||||
| 
 | ||||
| Ans. http://stackoverflow.com/questions/18799591/print-natural-sequence-with-help-of-2-threads1-is-printing-even-and-2nd-is-pri | ||||
|  Help us improve. Please let us know the company, where you were asked this question  : | ||||
|  Discuss  Correct / Improve   print natural numbers with two threads   multithreading   multi threading   threads   code   coding   makemytrip.com | ||||
| 
 | ||||
| Ans. http://www.geeksforgeeks.org/find-duplicates-in-on-time-and-constant-extra-space/ | ||||
|  Help us improve. Please let us know the company, where you were asked this question  : | ||||
|  Discuss  Correct / Improve   algorithm   program   code   coding  makemytrip.com | ||||