Graph representation

bhaiya ,
agar har ek node , every other node se connected hai to O(N^2) kese hai vo?

or ek implicit graph or bta do?

hello @CODER_JATIN

kis respresentation ka puch rahe ho aur space ya time complexity?

implicit graph matlab , jisme hame explicity ye na bataya ho ki kya edges hai , aur gya node hai.

[2,3,4,5]
ab jaise mai kahu ki tum tum ek even number se dusre even number pe jump kar sakte ho aur similarly ek odd se dusre odd pe.
to yaha pe maine koi graph nahi diya hai tumhe but tum usko graph samajh sakte ho(number ko node maan kar aur jo number ek dusre se connected hai unke bich edge maan kar)

bhaiya adjancy matrix wali multiplication mai puchra hu time complexity O(n2) kese?

or ye waali baat smjh aa gyi implicit graph wali :slight_smile:

wo O(N^2) space complexity ke baat kar rahe hai bhai.
kyunki hame NXN size ki adjacency matrix banane padgi.
aur agar grpah full connected hua (matlab ki har node baaki saare node se connected hai ) to matrix ki har ek entry bharni padgei

OKAY OKAY !!
THIK HAI BHAIYA :+1:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.