Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the Special Graphs and basic algorithms for them #9

Open
3 tasks
yashrsharma44 opened this issue Dec 4, 2020 · 16 comments
Open
3 tasks

Implement the Special Graphs and basic algorithms for them #9

yashrsharma44 opened this issue Dec 4, 2020 · 16 comments
Assignees
Labels
help wanted Extra attention is needed Intermediate Requires Intermediate Level skills new-feature New feature request

Comments

@yashrsharma44
Copy link
Member

yashrsharma44 commented Dec 4, 2020

Implement all types of traversal for -

  • Trees

Implement an algorithm to detect if a graph is -

  • Eulerian
  • Directly Acyclic Graph
@yashrsharma44 yashrsharma44 added help wanted Extra attention is needed new-feature New feature request Intermediate Requires Intermediate Level skills labels Dec 4, 2020
@130sayan
Copy link
Contributor

130sayan commented Dec 8, 2020

@yashrsharma44 @Biswajitghosh98 Can i work on the traversal in Trees and the Eulerian part?

@anishsofat
Copy link

@yashrsharma44 @Biswajitghosh98 Can I work on the algorithms to implement Bipartite and Directly Acyclic Graph?

@Biswajitghosh98
Copy link
Member

Biswajitghosh98 commented Dec 8, 2020

@130sayan @anishsofat Assigned. All the best !

@130sayan
Copy link
Contributor

130sayan commented Dec 8, 2020

@Biswajitghosh98 bfs and dfs have already been done for graphs. Should I do separately for Trees?

@Biswajitghosh98
Copy link
Member

Biswajitghosh98 commented Dec 8, 2020

@130sayan look up Morris Traversal and implement it on Binary Trees (directed)

@yashrsharma44
Copy link
Member Author

@130sayan you need to add inorder/preorder/postorder/levelorder for trees. You can use the existing dfs/bfs for your reference

@130sayan
Copy link
Contributor

130sayan commented Dec 9, 2020

@Biswajitghosh98 I have to check Eulerian for directed or undirected?

@Biswajitghosh98
Copy link
Member

@130sayan An Eulerian circuit can be made on both directed and undirected graphs. Considering the graph directed would cover both the cases.

@anishsofat
Copy link

@Biswajitghosh98 I have submitted a pull request for Bipartite Graph. In "Directly Acyclic Graph", is directly same as directed?

@Biswajitghosh98
Copy link
Member

@anishsofat yes. Let me have a look

yashrsharma44 pushed a commit that referenced this issue Dec 12, 2020
@130sayan
Copy link
Contributor

@yashrsharma44 @Biswajitghosh98 is it necessary to use morris traversal for various traversals or can I use Stack or recursion?

@yashrsharma44
Copy link
Member Author

I would suggest you to implement a Morris traversal separately, and for tree traversals, use stack.

@Biswajitghosh98
Copy link
Member

@130sayan Morris Traversal is special in a sense that it takes O(1) space while stack or recursion call stack takes up O(logn)

@Biswajitghosh98
Copy link
Member

@yashrsharma44 I think using Morris for inorder and pre-order would be nice instead of a separate implementation. What do you think ?

@yashrsharma44
Copy link
Member Author

yashrsharma44 commented Dec 12, 2020

Let's move ahead with @Biswajitghosh98 idea

@130sayan
Copy link
Contributor

Ok. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Intermediate Requires Intermediate Level skills new-feature New feature request
Projects
None yet
Development

No branches or pull requests

4 participants