TheAlgorithms / C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
https://thealgorithms.github.io/C-Plus-Plus
MIT License
30.79k stars 7.29k forks source link

feat: Add Job Sequencing Algorithm in C++ #2882

Open sneha0099 opened 4 weeks ago

sneha0099 commented 4 weeks ago

Description of Change

Closes #2881

Implemented the Job Sequencing Algorithm using a greedy approach to maximize profit by scheduling jobs within their respective deadlines. The jobSequencing() function arranges jobs based on the highest profit within the available time slots. Example input and expected output have been included in comments for clarity.

Checklist

Notes: This PR adds the Job Sequencing Algorithm, which is an essential greedy algorithm for maximizing profit from job scheduling.