C++ Practice Problems

This directory contains practice problems organized by topic to help you master C++ concepts.

Problem Sets

OOP Problems

Directory: oop/
Topics: Classes, Objects, Inheritance, Polymorphism, Encapsulation
Files:

Difficulty: ⭐⭐ to ⭐⭐⭐


LRU Cache Problems

Directory: lru/
Topics: Data Structures, Hash Maps, Doubly Linked Lists, Algorithm Design
Description: Practice implementing Least Recently Used (LRU) cache with visual explanations and step-by-step examples.

Difficulty: ⭐⭐⭐⭐⭐

LeetCode: LRU Cache Problem


How to Use This Directory

  1. Start with fundamentals: Begin with OOP problems to build a strong foundation
  2. Progress gradually: Move to more complex data structure problems
  3. Practice regularly: Try to solve at least one problem per day
  4. Test thoroughly: Write test cases for your solutions
  5. Review solutions: Compare your approach with optimal solutions

Difficulty Levels

External Practice Resources

Tips for Success

  1. Understand before coding: Read the problem carefully
  2. Plan your approach: Sketch out the algorithm first
  3. Start simple: Get a basic solution working before optimizing
  4. Test edge cases: Consider empty inputs, large inputs, etc.
  5. Analyze complexity: Think about time and space complexity
  6. Refactor: Improve your code after it works

Note: Solutions to some problems may be provided after submission deadlines or in lecture discussions.