maximal network rank | maximal network rank leetcode | leetcode 1615 | graph

preview_player
Показать описание


#Graph #Rank #Maximal #Maximal_Network_Rank #LeetCode #Problem1615 #Medium #Coding #Programming #Interview #Practice #DataStructure #Algorithm #Java #Preparation #NG #nickode #cct #cook_code_travel
Рекомендации по теме
Комментарии
Автор

at 2:57, for [0, 1], at line 8, your code checks, if road[0]==0 and road[1]==0 also, but it should be road[0]==0 && road[1]==1 || road[0]==1 && road[1]==0 right?

rohandevaki
Автор

oh wow, just the first 40 seconds helped understood a solution I saw under leetcode comments. you are awesome!

kupomomo
Автор

Thanks! I got stuck at the 3rd question for 40-50 minutes while I had coded it very fast. It was a really silly and dumb mistake which wasted a lot of my time.

nayankhanna
Автор

I got stuck in the description of this question, and when you explained the question @ 0:49 ; I quickly came up with the solution. Channel subscribed. Thanks.

K_EC_AushoRoup
Автор

Instead of 2D array you can have a hash of string and bool . Where edge string is "i#j" if there is an edge between i and j . This reduces the space complexity to O(E)

albumlist
join shbcf.ru