{"id":19178722,"url":"https://github.com/nassimtaghipour/bakery-java","last_synced_at":"2025-02-23T01:25:37.692Z","repository":{"id":126390991,"uuid":"238248456","full_name":"nassimtaghipour/Bakery-Java","owner":"nassimtaghipour","description":"optimized algorithm for bakery","archived":false,"fork":false,"pushed_at":"2020-04-04T19:53:14.000Z","size":119,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-04T03:08:34.373Z","etag":null,"topics":["algorithm","bakery","complexity","dynamic-programming","greedy-algorithms","java","optimization-algorithms","optimize"],"latest_commit_sha":null,"homepage":null,"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/nassimtaghipour.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-02-04T16:12:54.000Z","updated_at":"2022-03-14T08:20:26.000Z","dependencies_parsed_at":"2023-06-16T13:31:44.883Z","dependency_job_id":null,"html_url":"https://github.com/nassimtaghipour/Bakery-Java","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/nassimtaghipour%2FBakery-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nassimtaghipour%2FBakery-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nassimtaghipour%2FBakery-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nassimtaghipour%2FBakery-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nassimtaghipour","download_url":"https://codeload.github.com/nassimtaghipour/Bakery-Java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240255922,"owners_count":19772708,"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":["algorithm","bakery","complexity","dynamic-programming","greedy-algorithms","java","optimization-algorithms","optimize"],"created_at":"2024-11-09T10:40:40.091Z","updated_at":"2025-02-23T01:25:37.670Z","avatar_url":"https://github.com/nassimtaghipour.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bakery-Java\n optimized algorithm for bakery\n \nProblem:\nA bakery used to base the price of their produce on an individual item cost. So if a customer ordered\n10 cross buns then they would be charged 10x the cost of single bun. The bakery has decided to start\nselling their produce prepackaged in bunches and charging the customer on a per pack basis. So if the\nshop sold vegemite scroll in packs of 3 and 5 and a customer ordered 8 they would get a pack of 3 and\na pack of 5. \nThe bakery currently sells the following products:\n\n\u003cimg src=\"https://github.com/nassimtaghipour/Bakery-Java/blob/master/src/Order.png\" width=\"500\" height=\"200\"\u003e\n\n\nsolution:\n\nThe problem is rosolved by Dynamic Programming algorithm with time complexity of O(nm) (n refers to packets count and m refers to customer orders count) instead of recursive or other solutions with high complexity and heavy resources.\n\nthe solution contains unit tests that the first one is implemented by the dataset that was mentioned  and the second one is implemented with random count of packets and random count of orders that provides a large number of test modes (The prepared solution was tested more than 1000000 times)\n\nDev environment and libs:\n\nEclipse 4.12.0, JDK 12.0.2 \u0026 Junit 4.8.1\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnassimtaghipour%2Fbakery-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnassimtaghipour%2Fbakery-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnassimtaghipour%2Fbakery-java/lists"}