tulika-99 / DS_Algorithms

A collection of various Algorithms for Data Structures in different languages. HacktoberFest 2020-22 :octocat:
24 stars 124 forks source link

detect euler circuit in graph: cpp solution added #182

Closed adrikagupta closed 3 years ago

adrikagupta commented 3 years ago

Problem statement - Eulerian Path is a path in graph that visits every edge exactly once. Eulerian Circuit is an Eulerian Path which starts and ends on the same vertex. The task is to find that there exists the Euler Path or circuit or none in given undirected graph with V vertices and adjacency list adj. The task is to return 1 if graph contains Eulerian Path, 2 if graph contains Eulerian Circuit 0 otherwise.