Online Algorithms | Algorithm Interview | Skill-Lync Resources
Hard Algorithms Greedy Algorithms

What are online algorithms and competitive analysis?

Answer

Online algorithms make decisions without knowing future input, unlike offline algorithms with complete information. Competitive ratio compares online algorithm's cost to optimal offline solution. Examples: Paging/caching - LRU is k-competitive; Ski rental - rent vs buy is 2-competitive; Load balancing - greedy is 2-competitive. Lower bounds prove limits. Randomization can improve competitive ratios. Real applications: caching, scheduling, financial trading, resource allocation.

Master These Concepts with IIT Certification
IIT Certified

Master These Concepts with IIT Certification

175+ hours of industry projects. Get placed at Bosch, Tata Motors, L&T and 500+ companies.

Relevant for Roles

Senior Software Engineer Systems Architect Algorithm Developer