AAdityaintechvani.hashnode.dev·Oct 5 · 1 min readTime complexity: loops and the master theorem, quick guideMost time complexity questions in exams reduce to two skills: counting how many times a loop body runs, and solving a recurrence. Loops A loop for (i = 1; i <= n; i++) runs n times, so O(n). A loop w00
AAdityaintechvani.hashnode.dev·Oct 1 · 1 min readDeadlock in 4 checks: a quick way to solve exam problemsDeadlock questions are easier when you check four conditions in order. A deadlock needs all four at once: mutual exclusion, hold and wait, no preemption, and circular wait. Break any one and the deadl00