Browsed by
Category: Java

How to avoid null pointer

How to avoid null pointer

The concept of Null Reference is sometimes referred to as “The Billion Dollar Mistake”.  In keeping with modern best practices, you want to eliminate null values from your code.

General rules about null and Option

We begin with the following general rules regarding the use of null values in Scala code:

Read More Read More

Postorder Tree Traversal (DFS) in java

Postorder Tree Traversal (DFS) in java

In our previous post we had discussed about different approaches of implementing Preorder and Inorder tree traversal. In this article we shall discuss steps and different ways of implementing Postorder tree traversal.

There are different ways to traversal a tree in DFS such as:

  1. Preorder
  2. Inorder
  3. Postorder

Here in this article, we shall discuss steps and different approach of implementing Postorder tree traversal.

Read More Read More

Inorder Tree Traversal (DFS) in java

Inorder Tree Traversal (DFS) in java

In our previous post we had discussed about different approaches of implementing Preorder tree traversal. In this article we shall discuss steps and different ways of implementing Inorder tree traversal.

There are different ways to traversal a tree in DFS such as:

  1. Preorder
  2. Inorder
  3. Postorder

Here in this article, we shall discuss steps and different approach of implementing Inorder tree traversal.

Read More Read More