Library Book Loan Tracker

Medium Applied C++ OOP Mini Projects
Solve in Playground →

Problem Statement

Create `Book` (id, title, available) and `Library` classes. Process commands (`BORROW id` / `RETURN id`) and print the final availability (`True` or `False`) of a queried book ID.

Input Format

Line 1: N books. Next N lines: `id title`. Next line: M commands. Next M lines: `BORROW id` or `RETURN id`. Last line: query id.

Output Format

Print True or False for availability.

Constraints

1 <= N, M <= 20

Sample Input

2
101 Python
102 C
2
BORROW 101
RETURN 101
101

Sample Output

True

Explanation

Book 101 borrowed then returned becomes available (True).

Starter Code

#include <iostream>
#include <string>
#include <unordered_map>

class Book {
public:
    // Write your code here
};

class Library {
public:
    // Write your code here
};

int main() {
    // Implement I/O logic here
    return 0;
}

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used