Big-O aur complexity
Simple code ki time aur space complexity padhna aur batana seekho, O(1), O(log n), O(n), O(n log n) aur O(n²) ko compare karo, aur kuch chalaane se pehle hi tez approach chuno.
Beginner 3 · Data and toolsabout 2 hours5 sections
Seedha jawab
Big-O notation batata hai ki input badhne par algorithm ka kaam kaise badhta hai. O(1) sapaat rehta hai, O(n) input ke saath badhta hai, aur O(n²) input ke square ke saath badhta hai.
Ye kyun zaroori hai
Jo code 100 rows par theek chalta hai, woh 10 lakh par ghanton le sakta hai. Big-O aapko ye pehle hi dikha deta hai, aur har coding interview mein aapse apne answer ki complexity batane aur use behtar karne ko kaha jaata hai.
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