EdocGram
Home
(current)
Topics
EdocAI
Code Editor
HTML
Javascript
PHP
Python
Python AI Code Editor
More
Contact
About
Privacy Policy
Terms and Conditions
Log In
Topic
View
More
Topic
Hashing
Linked List
Queue
Stack
Backtracking
Dynamic Programming
Graph Theory
Bit Manipulation
Mathematics
Sliding Window Technique
Divide And Conquer
Matrix Manipulation
Two Pointers
Tree
Topic: graph-theory-problem / Level: beginner
1. What is Graph Theory?
2. Explain the difference between directed and undirected graphs.
3. Write a program to represent a graph using an adjacency list.
4. Write a program to represent a graph using an adjacency matrix.
5. Implement Breadth-First Search (BFS) for a given graph.
6. Implement Depth-First Search (DFS) for a given graph.
7. Write a function to check if a given graph is connected.
8. Implement a function to count the number of connected components in an undirected graph.
9. Find the shortest path between two nodes in an unweighted graph using BFS.
10. Write a program to detect a cycle in an undirected graph.
11. Calculate the in-degree and out-degree of each vertex in a directed graph.
12. Write a program to print all vertices reachable from a given vertex using DFS.
13. Check if a graph is bipartite using BFS.
14. Write a program to find the number of edges in a graph given the adjacency list.
15. Count the number of vertices in a graph.
16. Write a program to print all nodes in a graph using BFS.
17. Write a program to print all nodes in a graph using DFS.
18. Implement a function to find if there is a path between two nodes in an undirected graph.
19. Write a program to find the maximum degree of any vertex in a graph.
20. Write a function to check if a given graph is a tree.
21. Implement an algorithm to find the diameter of a tree.
22. Write a program to find all leaf nodes in a binary tree.
23. Implement an algorithm to find the height of a binary tree.
24. Write a function to check if a graph is a forest.
25. Implement a program to convert an adjacency matrix to an adjacency list.
26. Write a function to find the connected components of a graph.
27. Implement a program to find the center of a tree.
28. Write a function to find the ancestors of a node in a tree.
29. Write a program to find the lowest common ancestor of two nodes in a binary tree.
30. Check if a graph is Eulerian.
31. Find the articulation points in a graph.
32. Write a function to find the shortest path using DFS.
33. Implement a program to reverse the edges of a graph.
34. Write a program to print the degree of each vertex.
35. Implement an algorithm to flatten a binary tree.
36. Write a function to perform a level-order traversal of a binary tree.
37. Implement an algorithm to find the longest path in a binary tree.
38. Write a program to check if two graphs are equal.
39. Implement a function to serialize and deserialize a binary tree.
40. Write a program to find all simple paths in a graph.
41. Find the shortest path from a given source to all other nodes in a graph using Dijkstras algorithm.
42. Write a program to determine if a graph has a cycle using DFS.
43. Implement a program to check for self-loops in a directed graph.
44. Write a function to find all cycles in a directed graph.
45. Check if a directed graph is acyclic.
46. Write a program to find the maximum flow in a flow network using BFS.
47. Implement a program to find the longest common path in a tree.
48. Write a function to perform a depth-first traversal of a tree.
49. Implement a program to find the minimum spanning tree using Prims algorithm.
50. Write a program to print the adjacency matrix of a graph
Previous
1
2
...
20
Next
More Levels
Intermediate
Advanced
Aniket The Programmer
This website is managed by aniket the programmer :)
Website
Instagram