How to solve WeirdSort problem via the tag "dfs and similar"?
What would be the algorithm of solving the above problem with the help of Dfs and similar approach?
I know the most common solution of this question but i had a doubt on how to solve this question via the implementation of graph theory.Would be really grateful if anyone could solve my query.