Breadth first search is an algorithm which searches or traverses all the vertices in a graph. It starts to traverse the graph based on a start vertex. The algorithm traverses the vertices from closest ones to farthest ones. As graphs can have cycles we should not visit any visited vertex twice. For this purpose the … Continue reading Breadth First Search (BFS) in a Graph
Month: Jul 2021
Recursive SQL queries
Recursion Recursion is the technique in which a function calls itself from within its own body.You can find out more about what is recursion and see some examples in various programming languages, a good resource is this one. Common Table Expression It is possible to achieve a recursion within a SQL query.This is possible with … Continue reading Recursive SQL queries