Web Crawler is a bot that downloads the content from the internet and indexes it. The main purpose of this bot is to learn about the different web pages on the internet. This kind of bots is mostly operated by search engines. By applying the search algorithms to the data collected by the web crawlers, search engines can provide the relevant links as a response for the request requested by the user. In this article, let’s discuss how the web crawler is implemented....
Given an undirected graph, The task is to check if there is a cycle in the given graph....
Given a matrix A[][] of size N * M columns each element consists of either 0 representing free space and 1 representing wall. In one operation you can move from the current cell to Up, Down, Left or Right with 0 cost and move diagonally with cost 1. The task is to find the minimum cost to travel from top-left to bottom-right....
Given a Directed Graph with N vertices value from 0 to N – 1 and N – 1 Edges, the task is to count the number of edges must be reversed so that there is always a path from every node to node 0....
Given two integers N and M, the task is to find the sequence of the minimum number of operations required to convert the number N into M such that in each operation N can be added (N = N + N), subtracted as (N = N – N), multiplied as (N = N*N), or divided as (N = N/N). If it is not possible to convert N into M then print “-1”....
Given an adjacency list representation of a directed graph, the task is to find the path from source to every other node in the graph using BFS....
Breadth-first search is a graph traversal algorithm which traverse a graph or tree level by level. In this article, BFS for a Graph is implemented using Adjacency list without using a Queue.Examples:...
0-1 BFS Algorithm is a variation of simple BFS and is used to calculate Single vertex_source Shortest Path to all the nodes in a weighted graph provided the edges have weights 0 and 1 only. This algorithm runs in O(|E|) time which is much faster as compared to the Single Source Shortest Path Algorithms....
Finding the shortest way is becoming more important in a world where time and distance matter. There are multiple shorted path algorithms exists. Therefore, in this article, we will compare the shortest path algorithms on the basis of their complexity and their performance, which will help us to use the correct algorithm according to our requirements....
Given a binary tree consisting of N nodes. Find the path between the node having the lowest value to the node having the highest value. There is no restriction on the traversal, i.e. the tree can be traversed upward, bottom, left and right....
Given a directed graph with N nodes and M connections shown in the matrix mat[] where each element is of the form {xi, yi} denoting a directed edge from yi to xi. The task is to use the minimum number of colours to paint the nodes of the graph such that no two nodes in a path have the same colour....
Given two integers N and X, the task is to convert 1 to N using minimum operations of any of the following operations:...