Skip to main content

Trees और graphs

Trees और graphs को code में represent कर पाओगे, breadth-first और depth-first search से traverse कर पाओगे, और shortest path, connected groups और cycles ढूँढने के लिए सही search चुन पाओगे।

Intermediate 1 · LLM builderabout 3 hours5 sections

सीधा जवाब

Graph यानी nodes जो edges से जुड़े हों; tree वो graph है जिसमें cycle नहीं होता। Breadth-first search सबसे कम hops वाला path ढूँढता है, और depth-first search वो सब explore करता है जहाँ तक पहुँचा जा सकता है।

ये क्यों ज़रूरी है

Road maps, social networks, file systems, org charts और RAG के knowledge graphs, सब trees या graphs हैं। Graph traversal interview का एक बहुत common topic है, और routing और recommendation features भी इसी से चलते हैं।

Sign up free to read the whole lesson

The rest of this lesson: 5 parts, video lessons, the best course, practice and a quick check. It is free, takes a few seconds and needs no card.

Accounts are for learners aged 18 and over. Under 18? The quick answer and the first part of every lesson stay open: browse lessons by topic.

Data structures and algorithmsIntermediate 1: LLM builderVideo lessonsBinary treeGraphBreadth-first searchDepth-first search

Track

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.