An adjacency list represents a graph as an array of linked list.
The index of the array represents a vertex and each element in its linked list represents the other vertices that form an edge with the vertex.
Adjacency List representation
A graph and its equivalent adjacency list representation is shown below.
An...
undefined
201
Traversal meaning visiting all the nodes of a graph. Breadth first Search is also known as Breadth first traversal and is a recursive algorithm for searching all the nodes of a graph or tree data structure.
BFS algorithm
A standard BFS algorithm implementation puts each nodes of the graph or tree into one of two categories:
Visited...
undefined
201
Traversal meaning visiting all the nodes of a given graph. Depth first Search is also know as Depth first traversal. DFS is a recursive algorithm for searching all the vertices of a graph or tree.
DFS algorithm
A standard DFS implementation puts each vertex of the graph into one of two categories:
1.Visited
2. Not...
undefined
201
Before looking into Heap Sort, let's understand what is Heap and how it helps in sorting.
What is Complete Binary Tree?
A Complete binary tree is a binary tree in which every node other than the leaves has two children. In complete binary tree at every level, except possibly the last, is completely filled, and all nodes...
undefined
201
Related questions: Sort Linked List using Merge Sort, Given a Linked list, Sort it using Merge Sort Algorithm.
Merge sort is preferred algorithm for sorting a linked list, lets see why,
The way linked list is structured which doesn't allow random access makes some other algorithms like Quicksort perform poorly,...
undefined
201
Given a array of integers, Sort it using Insertion sort.
Lets understand what is the input and the expected output.
Example
Assume 5 persons of different heights are visiting at your office each at 5 minutes interval and you need to make them stand according to their heights(smaller to higher). How you will do?
Below...
undefined
201
How To deploy Spring Boot application on existing Tomcat?
Related Questions:- Deploy a Spring Boot WAR into a Tomcat Server, Spring Boot – Deploy WAR file to Tomcat
Spring boot is a framework that allow you to set up production ready setup of spring application and also Tomcat is one of the most popular...
undefined
201
How to use regular
expressions with String methods in Java?
Strings in Java have built-in support for regular
expressions.
Strings have 4 built-in methods for regular expressions,
i.e., the matches(), split()), replaceFirst() and replaceAll() methods.
Method
...
undefined
201
What are the rules of writing regular expressions?
There are some rules
for writing a regular expression or regex in java. Lets discuss about those
rule. But first have a look on What are regular expressions or regex?
Common matching symbols
that used in regex
Regular Expression
Description
...