Hierarchical data with parent & child relationships are very common, and Java collection does not have a Tree data structure, hence it is a popular interview question. Further questions include tree data structure processing using recursiion &
…
Hierarchical data with parent & child relationships are very common, and Java collection does not have a Tree data structure, hence it is a popular interview question. Further questions include tree data structure processing using recursiion &
…
Q1. How would you go about designing a “farm animals” application where animals like cow, pig, horse, etc move from a barn to pasture, a stable to paddock, … Read...
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”
…
Q. Traverse the tree in depth and return a list of all passed nodes. It should handle different data types as Double, String, etc. The interface for the tree node...
Auto-unboxing, switch, short circuit logical operators & exception handling are core Java basics that sometimes lead to obscure errors if not understood well & often tested in coding tests.
Q1.
…
Scenarios based Java OO concepts & GoF design patterns
Q. Complete the following “TreeProcessingImpl” class ….. so that the unit tests shown below pass? Skeleton Code Unit Tests A. … Read more ›...
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...
The following post improves on the design flaws listed in the previous post entitled 02: Scenarios based Java OO design & GoF design patterns – naive Template Method pattern. …...
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)? … Read more...