Problems

58 of 200 solved

58 solved| 15 in progress
ProblemPathDifficultyStatusConceptTime
Two SumArrays & StringsEasycompletedHash Map Lookup10mBest Time to Buy and Sell StockArrays & StringsEasycompletedKadane's Variant10mContains DuplicateArrays & StringsEasycompletedSet Usage5mValid AnagramArrays & StringsEasycompletedFrequency Count8mProduct of Array Except SelfArrays & StringsMediumcompletedPrefix/Suffix15mMaximum SubarrayArrays & StringsMediumcompletedKadane's Algorithm12mContainer With Most WaterArrays & StringsMediumcompletedTwo Pointers15m3SumArrays & StringsMediumcompletedTwo Pointers + Sort20mLongest Substring Without RepeatingArrays & StringsMediumcurrentSliding Window15mMinimum Window SubstringArrays & StringsHardlockedSliding Window25mGroup AnagramsArrays & StringsMediumlockedHash Map Grouping15mTrapping Rain WaterArrays & StringsHardlockedTwo Pointers25mReverse Linked ListLinked ListsEasycompletedIterative Reversal8mMerge Two Sorted ListsLinked ListsEasycompletedDummy Head10mLinked List CycleLinked ListsEasycompletedFloyd's Algorithm8mRemove Nth Node From EndLinked ListsMediumcompletedTwo Pointers12mReorder ListLinked ListsMediumcompletedFind Middle + Reverse + Merge18mAdd Two NumbersLinked ListsMediumcurrentCarry Propagation15mCopy List with Random PointerLinked ListsMediumlockedHash Map Clone20mMerge K Sorted ListsLinked ListsHardlockedHeap / Divide & Conquer25mTwo SumHash Maps & SetsEasycompletedValue → Index Map8mValid AnagramHash Maps & SetsEasycompletedCounter Comparison5mGroup AnagramsHash Maps & SetsMediumcompletedSorted Key Grouping12mTop K Frequent ElementsHash Maps & SetsMediumcompletedCounter + heapq12mLongest Consecutive SequenceHash Maps & SetsMediumcompletedSet Lookup15mEncode and Decode StringsHash Maps & SetsMediumcompletedLength Prefix10mSubarray Sum Equals KHash Maps & SetsMediumcompletedPrefix Sum + Map15mIsomorphic StringsHash Maps & SetsEasycompletedBi-directional Map8mLRU CacheHash Maps & SetsHardcompletedOrderedDict25mDesign HashMapHash Maps & SetsEasycompletedChaining15mValid ParenthesesStacks & QueuesEasycompletedStack Matching8mMin StackStacks & QueuesMediumcompletedAuxiliary Stack10mEvaluate Reverse Polish NotationStacks & QueuesMediumcompletedOperand Stack10mDaily TemperaturesStacks & QueuesMediumcompletedMonotonic Stack12mCar FleetStacks & QueuesMediumcompletedStack + Sort15mLargest Rectangle in HistogramStacks & QueuesHardcompletedMonotonic Stack25mSliding Window MaximumStacks & QueuesHardcurrentMonotonic Deque20mImplement Queue using StacksStacks & QueuesEasylockedAmortized Transfer10mNext Greater ElementStacks & QueuesMediumlockedMonotonic Stack12mInvert Binary TreeTrees & GraphsEasycompletedRecursive Swap5mMaximum Depth of Binary TreeTrees & GraphsEasycompletedDFS Base Case5mSame TreeTrees & GraphsEasycompletedParallel DFS5mLevel Order TraversalTrees & GraphsMediumcurrentBFS with deque12mValidate BSTTrees & GraphsMediumlockedIn-order Bounds12mLowest Common AncestorTrees & GraphsMediumlockedRecursive LCA12mBinary Tree Right Side ViewTrees & GraphsMediumlockedBFS Last Node12mNumber of IslandsTrees & GraphsMediumlockedGrid DFS/BFS15mCourse ScheduleTrees & GraphsMediumlockedTopological Sort18mWord LadderTrees & GraphsHardlockedBFS Shortest Path25mClone GraphTrees & GraphsMediumlockedDFS + HashMap15mPacific Atlantic Water FlowTrees & GraphsMediumlockedMulti-source DFS20mSerialize and Deserialize TreeTrees & GraphsHardlockedPreorder + Queue25mDiameter of Binary TreeTrees & GraphsEasylockedDFS Height10mSubtree of Another TreeTrees & GraphsEasylockedRecursive Match10mBinary SearchSorting & Binary SearchEasycompletedClassic bisect5mSearch in Rotated Sorted ArraySorting & Binary SearchMediumcompletedModified Binary Search15mFind Minimum in Rotated ArraySorting & Binary SearchMediumcompletedBinary Search Pivot12mKth Largest ElementSorting & Binary SearchMediumcompletedheapq.nlargest15mSearch a 2D MatrixSorting & Binary SearchMediumcurrentFlattened Binary Search12mFind Peak ElementSorting & Binary SearchMediumlockedGradient Binary Search12mMerge IntervalsSorting & Binary SearchMediumlockedSort + Sweep12mNon-overlapping IntervalsSorting & Binary SearchMediumlockedGreedy + Sort15mMeeting Rooms IISorting & Binary SearchMediumlockedHeap + Sort15mMedian of Two Sorted ArraysSorting & Binary SearchHardlockedBinary Search Partition30mCount of Smaller Numbers After SelfSorting & Binary SearchHardlockedMerge Sort Variant30mClimbing StairsDynamic ProgrammingEasylockedFibonacci Pattern8mHouse RobberDynamic ProgrammingMediumlockedSkip/Take12mCoin ChangeDynamic ProgrammingMediumlockedUnbounded Knapsack15mLongest Increasing SubsequenceDynamic ProgrammingMediumlockedPatience Sort / DP15mWord BreakDynamic ProgrammingMediumlockedDP + Set Lookup15mUnique PathsDynamic ProgrammingMediumlocked2D Grid DP10mDecode WaysDynamic ProgrammingMediumlockedString DP12mLongest Common SubsequenceDynamic ProgrammingMediumlocked2D DP Table15m0/1 KnapsackDynamic ProgrammingMediumlockedClassic Knapsack15mPartition Equal Subset SumDynamic ProgrammingMediumlockedSubset Sum DP15mEdit DistanceDynamic ProgrammingMediumlocked2D DP20mBurst BalloonsDynamic ProgrammingHardlockedInterval DP30mRegular Expression MatchingDynamic ProgrammingHardlocked2D DP30mLongest Palindromic SubstringDynamic ProgrammingMediumlockedExpand Around Center15mSubsetsBacktracking & RecursionMediumlockedInclude/Exclude10mPermutationsBacktracking & RecursionMediumlockedSwap Backtrack12mCombination SumBacktracking & RecursionMediumlockedUnbounded Choices12mLetter Combinations of PhoneBacktracking & RecursionMediumlockedCartesian Product12mPalindrome PartitioningBacktracking & RecursionMediumlockedPartition + Check18mWord SearchBacktracking & RecursionMediumlockedGrid DFS18mN-QueensBacktracking & RecursionHardlockedColumn/Diagonal Sets25mSudoku SolverBacktracking & RecursionHardlockedConstraint Propagation30mGenerate ParenthesesBacktracking & RecursionMediumlockedOpen/Close Count12mRestore IP AddressesBacktracking & RecursionMediumlockedSegmented Backtrack15mFizz Buzz (Pythonic)Pythonic PatternsEasycompletedList Comprehension5mMatrix TransposePythonic PatternsEasycompletedzip(*matrix)5mFlatten Nested ListPythonic PatternsMediumcompletedyield from10mRunning Sum with accumulatePythonic PatternsEasycompleteditertools.accumulate5mDictionary Merge & UpdatePythonic PatternsEasycompleteddict | operator5mCustom Sort with key=Pythonic PatternsMediumcompletedLambda Keys10mWalrus Operator PatternsPythonic PatternsMediumcurrent:= in loops12mDataclass vs NamedTuplePythonic PatternsMediumlockedStruct Patterns15mTop K Frequent (Counter)Python Collections & itertoolsMediumcompletedCounter.most_common10mMerge K Sorted (heapq)Python Collections & itertoolsHardcompletedheapq.merge20mGroup By Key (defaultdict)Python Collections & itertoolsEasycurrentdefaultdict(list)8mSliding Window Max (deque)Python Collections & itertoolsHardlockedcollections.deque20mCombinations & ProductsPython Collections & itertoolsMediumlockeditertools.product12mChain & FlattenPython Collections & itertoolsMediumlockeditertools.chain.from_iterable10mOrdered Window (OrderedDict)Python Collections & itertoolsMediumlockedOrderedDict.move_to_end15mBisect Insert PatternsPython Collections & itertoolsMediumlockedbisect.insort12mPriority Queue with heapqPython Collections & itertoolsMediumlockedCustom __lt__12mDesign URL ShortenerSystem Design BasicsMediumcurrentHashing + DB25mDesign Rate LimiterSystem Design BasicsMediumlockedToken Bucket20mDesign Key-Value StoreSystem Design BasicsMediumlockedConsistent Hashing25mDesign Twitter FeedSystem Design BasicsHardlockedFan-out / Pull30mDesign Chat SystemSystem Design BasicsHardlockedWebSocket + Queues30mDesign Notification ServiceSystem Design BasicsMediumlockedPub/Sub25mDesign File Storage (S3)System Design BasicsHardlockedChunking + Metadata30mDesign Search AutocompleteSystem Design BasicsMediumlockedTrie + Ranking25mDesign Web CrawlerSystem Design BasicsMediumlockedBFS + Politeness25mDesign InstagramSystem Design BasicsHardlockedCDN + Sharding35mPrint in Order (Threading)Concurrency & AsyncEasylockedBarrier / Event10mProducer-ConsumerConcurrency & AsyncMediumlockedqueue.Queue15mDining PhilosophersConcurrency & AsyncMediumlockedLock Ordering20mAsync Web ScraperConcurrency & AsyncMediumlockedaiohttp + gather15mRate-Limited API CallerConcurrency & AsyncMediumlockedasyncio.Semaphore15mThread-Safe CounterConcurrency & AsyncEasylockedthreading.Lock8mFiltering & Sorting ResultsSQL FundamentalsEasycurrentMCQ — WHERE + ORDER BY5mWrite a JOIN QuerySQL FundamentalsEasylockedINNER JOIN10mAggregation & GROUP BYSQL FundamentalsMediumlockedSUM + HAVING15mSubqueries vs CTEsSQL FundamentalsMediumlockedMCQ — WITH clause10mWindow Functions for RankingSQL FundamentalsHardlockedROW_NUMBER + PARTITION BY20mChoosing the Right Field TypeDjango Models Deep DiveEasycurrentMCQ — Field Types3mComplete the Blog Post ModelDjango Models Deep DiveEasylockedIncomplete Code8mUnderstanding on_delete BehaviourDjango Models Deep DiveMediumlockedMCQ — Relationships3mFix the Broken Order ModelDjango Models Deep DiveHardlockedFix Buggy Code15mAbstract Base Model with InheritanceDjango Models Deep DiveHardlockedIncomplete Code20mCreate a Django Project & AppDjango FundamentalsEasycompletedstartproject / startapp8mDefine a Blog Post ModelDjango FundamentalsEasycompletedmodels.Model + fields10mRun & Write MigrationsDjango FundamentalsEasycompletedmakemigrations / migrate8mRegister Models in AdminDjango FundamentalsEasycompletedadmin.site.register5mQuerySet Filtering & ChainingDjango FundamentalsMediumcurrent.filter() / .exclude()12mFunction-Based Views + URLsDjango FundamentalsMediumlockedpath() + HttpResponse12mTemplate Rendering & ContextDjango FundamentalsMediumlockedrender() + {% block %}12mModel Relationships (FK, M2M)Django FundamentalsMediumlockedForeignKey / ManyToMany15mDjango Forms & ValidationDjango FundamentalsMediumlockedforms.ModelForm15mClass-Based ViewsDjango FundamentalsMediumlockedListView / DetailView15mInstall DRF & First SerializerDjango REST FrameworkEasycompletedModelSerializer8mAPIView: List & CreateDjango REST FrameworkMediumcompletedAPIView + Response12mViewSet + Router SetupDjango REST FrameworkMediumcurrentModelViewSet + DefaultRouter12mNested SerializersDjango REST FrameworkMediumlockedNested relationships15mToken AuthenticationDjango REST FrameworkMediumlockedTokenAuthentication15mCustom PermissionsDjango REST FrameworkMediumlockedIsAuthenticated / custom15mFiltering & SearchDjango REST FrameworkMediumlockeddjango-filter + SearchFilter12mPagination StrategiesDjango REST FrameworkMediumlockedPageNumber / Cursor10mFile Upload EndpointDjango REST FrameworkMediumlockedFileUploadParser15mTesting DRF APIsDjango REST FrameworkMediumlockedAPIClient + fixtures15mCustom MiddlewareDjango Advanced PatternsMediumlockedprocess_request / response15mDjango Signals (post_save)Django Advanced PatternsMediumlocked@receiver + post_save12mCustom Management CommandsDjango Advanced PatternsEasylockedBaseCommand.handle()10mCaching with RedisDjango Advanced PatternsMediumlockedcache.set / cache.get15mCelery Task QueueDjango Advanced PatternsHardlocked@shared_task20mCustom User ModelDjango Advanced PatternsMediumlockedAbstractBaseUser18mDatabase Optimization (select_related)Django Advanced PatternsMediumlockedN+1 query problem12mDjango Channels (WebSockets)Django Advanced PatternsHardlockedAsyncConsumer25mHello World with FastAPIFastAPI FundamentalsEasycompleted@app.get + uvicorn5mPath & Query ParametersFastAPI FundamentalsEasycompletedType annotations8mRequest Body with PydanticFastAPI FundamentalsEasycompletedBaseModel10mResponse Models & Status CodesFastAPI FundamentalsMediumcompletedresponse_model + 20110mDependency Injection BasicsFastAPI FundamentalsMediumcurrentDepends()12mCRUD with In-Memory StoreFastAPI FundamentalsMediumlockedPOST / GET / PUT / DELETE15mError Handling & HTTPExceptionFastAPI FundamentalsMediumlockedraise HTTPException10mMiddleware & CORSFastAPI FundamentalsMediumlockedCORSMiddleware10mBackground TasksFastAPI FundamentalsMediumlockedBackgroundTasks12mAuto-generated OpenAPI DocsFastAPI FundamentalsEasylocked/docs + /redoc8mSQLAlchemy Model + Engine SetupFastAPI + SQLAlchemyMediumcompleteddeclarative_base()12mSession Dependency InjectionFastAPI + SQLAlchemyMediumcurrentDepends(get_db)12mCRUD Operations with ORMFastAPI + SQLAlchemyMediumlockedsession.add / query15mAlembic MigrationsFastAPI + SQLAlchemyMediumlockedalembic revision --autogenerate15mRelationship Mapping (1:N, M:N)FastAPI + SQLAlchemyMediumlockedrelationship() + back_populates15mAsync SQLAlchemy SessionFastAPI + SQLAlchemyHardlockedAsyncSession + create_async_engine18mPagination & FilteringFastAPI + SQLAlchemyMediumlockedoffset / limit + query params12mTesting with TestClient + DBFastAPI + SQLAlchemyMediumlockedoverride_dependency15mPassword Hashing with bcryptFastAPI AuthenticationEasylockedpasslib + CryptContext8mJWT Token CreationFastAPI AuthenticationMediumlockedpython-jose + encode12mOAuth2PasswordBearer FlowFastAPI AuthenticationMediumlockedOAuth2PasswordBearer15mProtected RoutesFastAPI AuthenticationMediumlockedDepends(get_current_user)12mRole-Based Access ControlFastAPI AuthenticationMediumlockedScopes + Security15mRefresh Token PatternFastAPI AuthenticationHardlockedAccess + Refresh tokens18mRate Limiting MiddlewareFastAPI AuthenticationMediumlockedslowapi12mBasic Model & Field TypesPydantic & Data ValidationEasycompletedstr, int, Optional5mField Validators (@field_validator)Pydantic & Data ValidationMediumcompleted@field_validator10mNested ModelsPydantic & Data ValidationMediumcompletedModel composition10mCustom Serialization (model_dump)Pydantic & Data ValidationMediumcurrentmodel_dump / model_json10mSettings with BaseSettingsPydantic & Data ValidationMediumlockedenv vars + .env12mDiscriminated UnionsPydantic & Data ValidationHardlockedLiteral + Discriminator15mGeneric ModelsPydantic & Data ValidationHardlockedGeneric[T]15mJSON Schema GenerationPydantic & Data ValidationMediumlockedmodel_json_schema()10mHybrid PropertiesSQLAlchemy Deep DiveMediumlocked@hybrid_property15mEvent Listeners (before_insert)SQLAlchemy Deep DiveMediumlockedevent.listen()12mRaw SQL with text()SQLAlchemy Deep DiveMediumlockedsession.execute(text())10mEager vs Lazy LoadingSQLAlchemy Deep DiveMediumlockedjoinedload / selectinload15mPolymorphic ModelsSQLAlchemy Deep DiveHardlocked__mapper_args__20mMulti-tenancy PatternsSQLAlchemy Deep DiveHardlockedSchema-per-tenant25mQuery Profiling & EXPLAINSQLAlchemy Deep DiveMediumlockedecho=True + EXPLAIN12m

Showing 200 of 200 problems