{"id":15678773,"url":"https://github.com/gervinfung/knapsackproblem","last_synced_at":"2025-03-30T09:14:24.268Z","repository":{"id":115227049,"uuid":"323900549","full_name":"GervinFung/KnapsackProblem","owner":"GervinFung","description":"Do you know how to solve the knapsack? Come and find out how to solve Knapsack in 5 different ways. Time/Space Complexity included","archived":false,"fork":false,"pushed_at":"2021-06-11T09:47:48.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T11:19:02.806Z","etag":null,"topics":["branch-and-bound","bruteforce","dynamic-programming","genetic-programming","knapsack-problem-dynamic","knapsack-problem-genetic","knapsack01","leat-cost-branch-and-bound","memoization"],"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/GervinFung.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":"2020-12-23T12:48:03.000Z","updated_at":"2021-12-04T08:38:38.000Z","dependencies_parsed_at":"2023-05-25T22:31:49.375Z","dependency_job_id":null,"html_url":"https://github.com/GervinFung/KnapsackProblem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GervinFung%2FKnapsackProblem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GervinFung%2FKnapsackProblem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GervinFung%2FKnapsackProblem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GervinFung%2FKnapsackProblem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GervinFung","download_url":"https://codeload.github.com/GervinFung/KnapsackProblem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246296609,"owners_count":20754635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["branch-and-bound","bruteforce","dynamic-programming","genetic-programming","knapsack-problem-dynamic","knapsack-problem-genetic","knapsack01","leat-cost-branch-and-bound","memoization"],"created_at":"2024-10-03T16:24:51.467Z","updated_at":"2025-03-30T09:14:24.247Z","avatar_url":"https://github.com/GervinFung.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solving 0/1 Knapsack Problem in 5 different ways\nNOTE:\n1. *Algorithm contains items chosen as well, so the time complexity would be different from conventional algorithms* 2. *Do correct me if I am wrong*\n\n**n = Number Of Items \u0026\u0026 w = Weight of Items**\n\n**N = Number Of Generations \u0026\u0026 P = Number Of Populations**\n\nName of Algorithms|Best|Average|Worst|Space Complexity|\n| --- | --- | --- | --- | --- |\nDynamic Programming|Ω(n)|Θ(n)|O(n)|O(n)|\nLeast Cost Branch \u0026 Bound|O(n)| O(n) ~ O(2 ^ n) |O(2)|O(n)|\nMemoize|Ω(nW log(n))|Θ(nW log(n))|O(nW log(n))|O(nW)\nBrute Force|Ω(2n ^ n)|Θ(2n ^ n)|O(2n ^ n)|O(n)|\nGenetic Programming|Ω(NP)|Θ(NP)|O(NP)|O(NP)|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgervinfung%2Fknapsackproblem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgervinfung%2Fknapsackproblem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgervinfung%2Fknapsackproblem/lists"}