PetarV- / Algorithms

Several algorithms and data structures implemented in C++ by me (credited to others where necessary).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding LexDFS and LexBFS

ekanshjha opened this issue · comments

It'll be awesome to see the implementation for lexicographically DFS and BFS.

It's actually quite simple to implement LexDFS in O(min(n^2, n+mloglog(n))).
It can also be implemented in linear time for cocomparability graphs as described here:
https://arxiv.org/pdf/1404.5996.pdf

I would like to implement lex DFS and Lex BFS