• 26 September

### Print all subarrays of a given array

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see how to print all subarrays of given array. Problem Print all print all subarrays of given array. For example: If array is {1,2,3} then you need to print {1}, […]

• 08 November

### Dijkstra’s algorithm in java

If you want to practice data structure and algorithm programs, you can go through Java coding interview questions. In this post, we will see Dijkstra algorithm for find shortest path from source to all other vertices. Problem You will be given graph with weight for each edge,source vertex and you need to find minimum distance from […]

• 16 September

### Doubly Linked List in java

If you want to practice data structure and algorithm programs, you can go through Java coding interview questions. In this post, we will see about Doubly LinkedList implementation in java. We have already seen the implementation of singly linked list. You can consider this as an extension of Singly linked list.It is quite complex to implement […]

• 27 December

### Depth First Search in java

If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In previous post, we have seen breadth-first search(bfs). In this post, we will see how to implement depth-first search(DFS) in java. Graph traversal Algorithms Breadth first search in java Depth first search in java In DFS,  You […]

• 22 October

### Trie data structure in java

If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this post, we will see about trie data structure in java. What is Trie : Trie is data structure which stores data in such a way that it can be retrieved faster and improve the performance. […]

• 27 December

### Breadth first search in java

If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. We have already seen about breadth first search in level order traversal of binary tree. Graph traversal Algorithms: Breadth first search in java Depth first search in java Breadth first search is graph traversal algorithm. In this […]

• 10 October

### Convert sorted array to balanced binary search tree

If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this post ,  we will see how to convert sorted array to balanced binary search tree. Algorithm: You might know that inorder traversal of binary search tree results in sorted array. We will use this property […]

• 16 September

### Check if a binary tree is binary search tree or not in java

If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this post, we will see how to check if given binary tree is binary search tree or not. This is one of important interview questions on binary tree. We will see two approaches to check if […]

• 16 April

### Delete a node from binary search tree in java

If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this post, we will see how to delete a node from binary search tree. There are two parts to it. Search the node After searching that node, delete the node. There are three cases which we […]