Skip to content

C++ Binary Search Tree implementation for task management with duration-based organization and comprehensive search operations

Notifications You must be signed in to change notification settings

Cs-Jimmy/BST-Task-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌳 Binary Search Tree Task Manager

A comprehensive C++ implementation of a Binary Search Tree data structure specifically designed for task management and organization based on duration-based prioritization.

πŸ“‹ Project Overview

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.

⭐ Core Features

  • πŸ”§ 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.txt file
  • 🎯 Interactive Menu System - User-friendly command-line interface

πŸ”§ System Architecture

Core Classes

  • Task: Data container storing task description, duration, and category
  • BSTNode: Node structure containing Task objects with left/right pointers
  • BST: Main Binary Search Tree implementation with comprehensive operations

🌲 Tree Structure Visualization

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

πŸ“ Input Format

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

πŸ’» Usage Example

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]

About

C++ Binary Search Tree implementation for task management with duration-based organization and comprehensive search operations

Topics

Resources

Stars

Watchers

Forks

Languages