Big-O और complexity
सादे code की time और space complexity पढ़ और बता पाओगे, O(1), O(log n), O(n), O(n log n) और O(n²) की तुलना कर पाओगे, और कुछ भी चलाने से पहले तेज़ approach चुन पाओगे।
Beginner 3 · Data and toolsabout 2 hours5 sections
सीधा जवाब
Big-O notation बताता है कि input बढ़ने पर algorithm का काम कैसे बढ़ता है। O(1) एक जैसा रहता है, O(n) input के साथ बढ़ता है, और O(n²) input के वर्ग के हिसाब से बढ़ता है।
ये क्यों ज़रूरी है
जो code 100 rows पर ठीक चलता है, वो 10 लाख पर घंटों ले सकता है। Big-O से आप ये पहले ही देख लेते हो, और हर coding interview में आपसे अपने जवाब की complexity बताने और उसे बेहतर करने को कहा जाता है।
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.
Related
Data structures and algorithmsBeginner 3: Data and toolsVideo lessonsBig-O notationHash mapBinary search