Blog Archives
Page 1 of 3
1 2 3

01: String parsing & date formatting – complete the given code

Q. Complete the method “changeDateFormat(String paragraph)” which takes a string input containing dates in mm/dd/yyyy format and converts them to “dd/mm/yyyy” format. For example, “My birthday is on 04/25/1980” becomes “My birthday is on 25/04/1980

A.

Read more ›



02: Working with Java Collections – Complete the given code

Q. Complete the method “canAttendAll(Collection seminars)” which takes a collection of seminar objects with start and end timestamps, and the method should determine if there is an overlap in seminars events. In other words, if you can attend all the seminars. The above code needs to be saved into a...

Members Only Content
Log In Register Home


03: Tree navigation – is a BST Tree?

Q. Complete the method “isValidBST(Node root)” which takes a “Tree node” as an input to evaluate if the input is a valid BST (i.e. Binary Search Tree)? A. Detailed answers on recursive & iterative solutions. … Read more ›...

Members Only Content
Log In Register Home


04: Are Anagrams – Complete the given code

Q. Complete the “areAnagrams(String a, String b)” method so that it returns if two given input strings are anagram or not? A. An anagram is a word formed from another by rearranging its letters. For example, “pat” & … Read more ›...

Members Only Content
Log In Register Home


05: Is a palindrome – complete the given code

Q. Complete the method “isPalindrome(String str) ” which takes a “string” as an input to evaluate if the input is a palindrome? A. A palindrome is a word, phrase, verse, or sentence that reads the same backward or forward. … Read more ›...

Members Only Content
Log In Register Home


Page 1 of 3
1 2 3

800+ Java Interview Q&As Menu

Top