Q1. When is an object needs to implement the Comparable interface? a) When adding it to a HashSet. b) When adding it to a TreeSet. c) When adding it to …
Q1. When is an object needs to implement the Comparable interface? a) When adding it to a HashSet. b) When adding it to a TreeSet. c) When adding it to …
Q. Complete the “areAnagrams(String a, String b)” method so that it returns if two given input strings are anagram or not?
Why convert from a list to a map? Maps allow you to store and access data by a “KEY”. Lists only allow you to access data by either index or …
Q. Write code to traverse a tree and get the largest “root-to-leaf sum”? A “root-to-leaf sum” is a sum of the node values in a root-to-leaf path.
Q9. What is wring with this code?
Q. Complete the method “isPalindrome(String str) ” which takes a “string” as an input to evaluate if the input is a palindrome?
Q. Write code test if a given tree is a binary search tree (i.e. BST)? A. A binary search tree (BST) is a binary tree where each node satisfies the …
Q10 What is wring with this code?
Q. Write code to traverse a tree and return the sum of the values (Node.getValue()) of all nodes at the level N in the binary tree?
Q. Write code to traverse a binary tree and get the largest “root-to-leaf sum”? A “root-to-leaf sum” is a sum of the node values in a root-to-leaf path.
Q. Complete the method ” public DirPath cd(String newPath)” which applies the following rules: / : starting with “/” means root directory, else next directory path. ../ : means go …
An excellent written test question to assess your Java multi-threading knowledge. Please practice it by doing it yourself.
I have a good news, I got job offer. I like to share with you from my bottom of my heart feeling thankful to you.