{"id":20409708,"url":"https://github.com/sleekpanther/interval-scheduling","last_synced_at":"2026-04-19T02:33:18.445Z","repository":{"id":115108610,"uuid":"99428663","full_name":"SleekPanther/interval-scheduling","owner":"SleekPanther","description":"Greedy Algorithm to find the maximum number of mutually compatible jobs","archived":false,"fork":false,"pushed_at":"2017-08-07T11:48:26.000Z","size":673,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T02:43:03.738Z","etag":null,"topics":["algorithm","algorithm-design","algorithms","compatible","greed","greedy","greedy-algorithm","greedy-algorithms","interval","interval-scheduling","jobs","noah","noah-patullo","noahpatullo","optimal","pattullo","pattulo","patullo","patulo","schedule"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SleekPanther.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-05T14:45:59.000Z","updated_at":"2020-06-04T17:43:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c718f63-bbee-48eb-975f-3372a79b29a3","html_url":"https://github.com/SleekPanther/interval-scheduling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SleekPanther/interval-scheduling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2Finterval-scheduling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2Finterval-scheduling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2Finterval-scheduling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2Finterval-scheduling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SleekPanther","download_url":"https://codeload.github.com/SleekPanther/interval-scheduling/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2Finterval-scheduling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","algorithm-design","algorithms","compatible","greed","greedy","greedy-algorithm","greedy-algorithms","interval","interval-scheduling","jobs","noah","noah-patullo","noahpatullo","optimal","pattullo","pattulo","patullo","patulo","schedule"],"created_at":"2024-11-15T05:43:07.809Z","updated_at":"2026-04-19T02:33:18.426Z","avatar_url":"https://github.com/SleekPanther.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Interval Scheduling\nGreedy Algorithm to find the **maximum number** of mutually compatible jobs\n\n## Problem Statement\n- Job j starts at s(j) and finishes at f(j)\n- 2 jobs are **compatible** if they do not overlap (2nd job starts after or at the same time as the 1st one finishes)\n- **Goal: find the maximum number of mutually compatible jobs**\n- Example: 8 jobs {a, b, c, d, e, f, g, h}\n\n![](images/all-jobs.png)\n\n### Optimal = {b, e, h}\n![](images/optimal-jobs.png)\n\n## Algorithm\n**Consider jobs in ascending order of finish time f(j)**\n\n### Sorted Jobs\n![](images/sorted-jobs.png)\n\n### Pseudocode\n![](images/pseudocode.png)\n\n## Runtime\nSorting O(n log(n)) + for-loop Θ(n)  \n**O(n log(n))**\n\n## References\n- [Kevin Wayne Slides](https://www.cs.princeton.edu/~wayne/kleinberg-tardos/pearson/04GreedyAlgorithms-2x2.pdf)\n- [University of Washington Slides](https://courses.cs.washington.edu/courses/cse421/07su/slides/04greed-4up.pdf)\n- [T. M. Murali Slides](http://courses.cs.vt.edu/cs5114/spring2009/lectures/lecture04-greedy-scheduling.pdf)\n- [Carl Kingsford Slides](https://www.cs.umd.edu/class/fall2009/cmsc451/lectures/Lec04-interval.pdf)\n- [Violetta lonati Slides](http://lonati.di.unimi.it/algo/0910/lab/kowalski6.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleekpanther%2Finterval-scheduling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleekpanther%2Finterval-scheduling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleekpanther%2Finterval-scheduling/lists"}