Category: Data structures and algorithms

Web crawler – BreadthFirst Search
1. Introduction In this tutorial, we’ll develop a sample web crawler using BreadthFirst Search algorithm. A web crawler, or spider, is a type of bot that is typically operated by search engines like Google and Bing. Their purpose is to index the content of websites all across the Internet so that those websites can appear…

Breadth First Search Algorithm
1. Introduction Breadth First Search (BFS) is a graph traversal algorithm. Breadth First Search starts at the root vertex and explores all nodes at a particular level before moving on to the nodes at the next level. Breadth First Search requires extra data structure, usually the queue, to keep track of the child nodes that…

Adjacency matrix and adjacency list implementation
1. Introduction In this tutorial, we’ll see the implementation of adjacency list and adjacency matrix representation of graph. 2. Adjacency Matrix Implementation Consider the following two dimensional array representing an adjacency matrix representing a graph. The program finds all the edges in the graph. Output 3. Adjacency list representation For the Adjacency List Representation, we’ll…

Introduction to Graph
1. Introduction In this short tutorial, we’ll discuss Graph. We’ll discuss the terms related to graphs. Graphs are studied in Graph Theory. 2. What is Graph Theory? Graph theory is a branch of mathematics that studies the properties and applications of graphs, which are structures made up of vertices (nodes) connected by edges (links). It…