## Circular Linked List Complete Implementation

Earlier we have seen what is Singly Linked List and How to implement it. In a way you say that it’s an extension of singly linked list. I would suggest that if you do...

Earlier we have seen what is Singly Linked List and How to implement it. In a way you say that it’s an extension of singly linked list. I would suggest that if you do...

Objective: Given a binary tree, find the sum of all the nodes which are left as well as leaves nodes. Example: Approach: Approach is quite simple. Do the inorder traversal check if...

Objective: Given a binary tree, write a non recursive or iterative algorithm for postorder traversal. Example: Earlier we have seen “What is postorder traversal and recursive algorithm for it“, In this article we will...

Objective: Given a binary tree, write a non recursive or iterative algorithm for preorder traversal. Example: Earlier we have seen “What is preorder traversal and recursive algorithm for it“, In this article we will...

Objective: Given a binary tree, write a non recursive or iterative algorithm for Inorder traversal. Example: Earlier we have seen “What is Inorder traversal and recursive algorithm for it“, In this article we will...

Objective: Given a binary tree, write an algorithm to delete it. This is one of the basic problem in trees. if you are new to trees then this problem will help you build your...

Objective: Given a binary tree and a given number x, Write an recursive algorithm to search the element in the tree. This is one of the very basic problems of tree. If you are...

There are multiple ways to in which you can traverse a tree. In this article we will see these traversals in detail. If you are new to trees then I would recommend that you...

Objective: Given a binary tree, Write an non-recursive algorithm to find the size of the tree. Note : Size of the tree is number of nodes in the tree Approach: In our earlier post (link)...

Objective: Given an array of integers. find the Kth Smallest/largest element in the array. Example: int[] A = { 1, 2, 10, 20, 40, 32, 44, 51, 6 }; K=4. 4th smallest element in...

Earlier in we have seen Min-Heap and Max-Heap Implementation. Priority Queue is its built-in implementation in Java. In this article we will see how to perform Min-Heap and Max-Heap using Priority Queue. Brief: A...

Objective: Given an array of integers. find the second largest element in the array. Example: int[] A = { 1, 2, 10, 20, 40, 32, 44, 51, 6 }; Second largest Element : 44...

Breadth-First Search ( or Traversal) also know as Level Order Traversal. What is Breadth First Search: Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at...

Objective: Given a list of names ( first name and last name), sort the list by their last names. Example: List [] = {“Daenerys Targaryen”, “Jon Snow”, ” Tyrion Lannister”, ” Joffrey Baratheon”} Output:...

What is Backtracking Programming?? Recursion is the key in backtracking programming. As the name suggests we backtrack to find the solution. We start with one possible move out of many available moves and try...

%d bloggers like this: