For people checking this video, a quick note about the last recursive dfs in euler, if you adapt this to work on large graphs ( where iterating over all n is not possible), make sure you are actually visiting each edge once. Marking an edge as done will still make it E^2 on bad cases! Take care of that. Instead store the edges in stack/vector, and each time keep popping the last node when processing.
@ahmed_learning_science2 жыл бұрын
جزاك الله خيرا، شرح جميل
@abdelrhmanyousri59156 жыл бұрын
fantastic explanation go ahead
@gregory1975mai5 жыл бұрын
hello , please can you give me a prototype of lp function ? is it int lp (int i, int n); i can't undestand why you use n variable ? thanks in advance
@ArabicCompetitiveProgramming5 жыл бұрын
which sec?
@gregory1975mai5 жыл бұрын
thank you for your reply I do not understand your answer ( which sec? ), I rephrase my question: what is // lp (j, n)? is it a loop (part of the c ++ syntax) or other tihng thanks