File System Directory Simulator

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

Problem Statement

Model a hierarchical file system using C++ classes (`Node`, `Directory`, `File`). Support `mkdir name` and `touch name` inside the root directory, then print the sorted list of item names.

Input Format

Line 1: N commands (`mkdir x` or `touch y`).

Output Format

Print sorted space-separated names of created items.

Constraints

1 <= N <= 20

Sample Input

3
mkdir docs
touch note.txt
mkdir bin

Sample Output

bin docs note.txt

Explanation

Items created in the root directory are sorted alphabetically.

Starter Code

#include <iostream>
#include <string>
#include <map>

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

class Directory : public Node {
public:
    // Write your code here
};

class File : public Node {
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