Simple Web Server Router Simulator

Hard Applied C++ OOP Mini Projects PRO
🔒 Login to Unlock

Problem Statement

Implement a `Router` class supporting `add_route(path, handler_msg)` and `resolve(path)` which returns the handler string or ‘404 Not Found’.

Input Format

Line 1: N route additions (path msg). Next: M resolution queries (path).

Output Format

Print resolved handler messages separated by line breaks.

Constraints

1 <= N, M <= 15

Sample Input

2
/home WelcomeHome
/about AboutUs
2
/home
/contact

Sample Output

WelcomeHome
404 Not Found

Explanation

/home resolves to WelcomeHome, /contact gives 404.

Starter Code

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

class Router {
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