A comprehensive C++ implementation of a Binary Search Tree data structure specifically designed for task management and organization based on duration-based prioritization.
This application demonstrates the practical implementation of Binary Search Tree (BST) algorithms in a real-world task management context. The system organizes tasks by duration, enabling efficient searching, filtering, and management operations.
- π§ Dynamic Task Insertion - Add tasks with description, duration, and category
- π Duration-Based Search - Find all tasks matching specific duration criteria
- ποΈ Filtered Display Options - View tasks above/below duration thresholds
- ποΈ Comprehensive Deletion - Remove all tasks matching duration criteria
- π File-Based Initialization - Load tasks from external
tasks.txtfile - π― Interactive Menu System - User-friendly command-line interface
Task: Data container storing task description, duration, and categoryBSTNode: Node structure containing Task objects with left/right pointersBST: Main Binary Search Tree implementation with comprehensive operations
When tasks are inserted, the BST organizes them automatically by duration. Here's how actual tasks would be structured:
Sample Tasks:
- "Prepare presentation slides" (90 min, Academic)
- "Review code implementation" (45 min, Development)
- "Complete project documentation" (120 min, Academic)
- "Quick team standup" (30 min, Management)
- "Debug application" (75 min, Development)
Tree Structure:
[Prepare presentation slides, 90, Academic]
/ \
[Review code implementation, 45, Development] [Complete project documentation, 120, Academic]
/ \
[Quick team standup, 30, Management] [Debug application, 75, Development]
In-order traversal output:
[Quick team standup, 30, Management]
[Review code implementation, 45, Development]
[Debug application, 75, Development]
[Prepare presentation slides, 90, Academic]
[Complete project documentation, 120, Academic]
Tree Properties:
- Left subtree: All durations β€ current node
- Right subtree: All durations > current node
- In-order traversal: Produces sorted sequence of tasks by duration
Create a tasks.txt file with the following structure:
3
Complete project documentation
120
Academic
Review code implementation
45
Development
Prepare presentation slides
90
Academic
Welcome to the Task Manager program!
1. Insert a task
2. Display all
3. Search for a task
4. Remove a task
5. Display more than
6. Display less than
Enter number of option: 3
Enter the duration: 90
[Prepare presentation slides, 90, Academic]