We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Search
- Task Scheduling
- Discussions
Task Scheduling
Task Scheduling
Sort by
recency
|
48 Discussions
|
Please Login in order to post a comment
Just leaving this here: 🧪 Try 1: Schedule in input order
Tasks in order: (3, 4), (2, 5), (1, 3)
Time goes like this: - Task 1: takes 3 minutes → finishes at time = 3 → deadline = 4 → lateness = 0 - Task 2: takes 2 minutes → finishes at time = 3 + 2 = 5 → deadline = 5 → lateness = 0 - Task 3: takes 1 minute → finishes at time = 5 + 1 = 6 → deadline = 3 → lateness = 6 - 3 = 3 ❗
Check mobile phone prices qatar for more information.
int taskScheduling(int d, int m) { // Read d task descriptions vector> tasks; for (int i = 0; i < d; i++) { int duration, deadline; cin >> duration >> deadline; tasks.push_back({duration, deadline}); }
}
I like your task scheduling code. Can I integerate this algorithm on my website which is related account deletion
Here is my solution in java, javascript, python, C, C++, Csharp HackerRank Task Scheduling Problem Solution
My C++ solution: