1 2 3 4

## 00: Tree from a list & flattening it back to a list in Java

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 &

## 01: Tree flattening example in Java

Q. Traverse the tree in depth and return a list of all passed nodes. It should handle different data types as Double, String, etc. The4 interface for the tree node...

## 02: Tree structure – calculate average recursively & iteratively in Java

Q. Complete the following “TreeProcessingImpl” class ….. so that the unit tests shown below pass? Skeleton Code Unit Tests A. … Read more ›...

## 03: Tree traversal algorithms in Java

Q1. What are the different binary tree traversal mechanisms? A1. Traversing a tree means visiting all the nodes of a tree in order. … Read more ›...

## 03: Understanding Big O notations

Q. Have you seen job advertisements requiring Java candidates to work in real-time or high volume transaction processing systems? If you are applying for such jobs, … Read more ›...

## 04: Tree – Get root to leaf max sum in Java example

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. … Read more...

## 05: Is it a valid binary search tree (BST) ?

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...

## 06: Binary Tree – Sum Levels Java Example

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? … Read more ›...

## 06: Binary Tree – Get root to leaf max sum in Java example

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. … Read...

## 07: Tree – Sum Levels Java example

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 tree? A. … Read more ›...

###### Members Only Content

1 2 3 4
Top 