Tutorials (Java, Python, PHP, Bigdata, Algorithms & Data Structure), Interview Questions & Online Test 

Example blog post alt

GraphQL with Spring Boot (GraphQL + Spring Boot + Spring Data JPA + Gradle)

GraphQL is a query language for APIs as an alternate to Rest, GraphQL enables the clients to ask for exactly what they need and nothing more. A client application using GraphQL is fast and more stable because they control the data they get.

Continue reading

Example blog post alt

Builder Design Pattern

In this article we will learn about Builder Design Pattern, its usage, implementation and advantages. This is another creational design pattern from the Gang of Four Design Pattern Series.

Continue reading

Example blog post alt

Abstract Factory Design Pattern

Abstract Factory Design Pattern is a classic Gang of Four creational design pattern that is concerned with the creation of objects in an application. Abstract Factory design pattern is used to create instances of different classes of the same type using a factory class to separate the object creation logic from client program.

Continue reading

Example blog post alt

Factory Design Pattern

In this article we will learn about "Factory Design Pattern", its usage, implementation and advantages. This is another creational design pattern from the "Gang of Four Design Pattern" series.

Continue reading

Example blog post alt

Iterative Traversal of Binary Tree (Inorder, Preorder and Postorder) using Stack

In an Inorder traversal if the current node is having left node, than traverse left node first, print current node value second and if current node is having right node traverse right node in the last.

Continue reading

Example blog post alt

Tree Traversals (Inorder, Preorder and Postorder) using recursion

In an Inorder traversal if the current node is having left node, than traverse left node first, print current node value second and if current node is having right node traverse right node in the last.

Continue reading

Example blog post alt

Reverse level order traversal of a binary tree without Recursion

In this article we will see how to print reverse level order traversal of a binary tree using stack, The idea is to insert elements in a stack using simple level order traversal and than print the content of the stack to print the elements in reverse, we can do this with the help of a Queue, just need to insert right of current node first then left in the queue.

Continue reading

Example blog post alt

Reverse level order traversal of a binary tree using Recursion

To print level order traversal in reverse order we need to make sure that elements are printed only when the given level is equals to the highest level, as shown in the example code below.

Continue reading

Example blog post alt

Level order or breadth first traversal of a binary tree using recursion

In the article we will see how to do breadth first traversal of a binary tree without Queue, The idea is to obtain height of the tree, then print the tree one level at a time. We will use two methods for this purpose one method levelOrderTraversal() will print one level at a time from 1 to height of the tree while other method printALevel() will print a specific level.

Continue reading

Example blog post alt

Level order or breadth first tree traversal using Queue

In this article we will see "breadth first traversal" or "level order traversal" of a binary tree using stack, the level order traversal of above shown tree will be: 2, 7, 5, 2, 6, 9, 5, 11, 4

Continue reading

Got a technical query, or stuck somewhere ?