Congratulations
Congrats, you completed all necessary steps!
You implemented different functions that using BFS which may be useful for the Graph class. For now, the last tiny step is to think about some code reorganization and optimal usage.
You may notice that methods above usually contain similar code, and some methods can reuse others. For example, hasOneComponent()
and getComponents()
do the similar action, so we can combine them.
Let's go to the tasks!
Tack för dina kommentarer!
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Sammanfatta detta kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 7.69
Congratulations
Svep för att visa menyn
Congrats, you completed all necessary steps!
You implemented different functions that using BFS which may be useful for the Graph class. For now, the last tiny step is to think about some code reorganization and optimal usage.
You may notice that methods above usually contain similar code, and some methods can reuse others. For example, hasOneComponent()
and getComponents()
do the similar action, so we can combine them.
Let's go to the tasks!
Tack för dina kommentarer!
Awesome!
Completion rate improved to 7.69single