{"id":19027922,"url":"https://github.com/rexim/five-programming-problems","last_synced_at":"2025-10-11T23:41:16.255Z","repository":{"id":31846901,"uuid":"35414100","full_name":"rexim/five-programming-problems","owner":"rexim","description":"Solutions for five programming problems every Software Engineer should be able to solve in less than 1 hour","archived":false,"fork":false,"pushed_at":"2015-05-12T06:28:13.000Z","size":135,"stargazers_count":36,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-10T14:49:05.377Z","etag":null,"topics":[],"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/rexim.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}},"created_at":"2015-05-11T09:22:33.000Z","updated_at":"2025-06-07T19:12:52.000Z","dependencies_parsed_at":"2022-09-18T08:42:54.123Z","dependency_job_id":null,"html_url":"https://github.com/rexim/five-programming-problems","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rexim/five-programming-problems","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Ffive-programming-problems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Ffive-programming-problems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Ffive-programming-problems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Ffive-programming-problems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rexim","download_url":"https://codeload.github.com/rexim/five-programming-problems/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Ffive-programming-problems/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009401,"owners_count":26084580,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","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":[],"created_at":"2024-11-08T21:09:27.139Z","updated_at":"2025-10-11T23:41:16.214Z","avatar_url":"https://github.com/rexim.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Five Programming Problems #\n\nInspired by [Five programming problems every Software Engineer should be able to solve in less than 1 hour](https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour)\n\n## Problems ##\n\n### Problem 1 ###\n\n\u003e Write three functions that compute the sum of the numbers in a given\n\u003e list using a for-loop, a while-loop, and recursion.\n\n### Problem 2 ###\n\n\u003e Write a function that combines two lists by alternatingly taking\n\u003e elements. For example: given the two lists `[a, b, c]` and\n\u003e `[1, 2, 3]`, the function should return `[a, 1, b, 2, c, 3]`.\n\n### Problem 3 ###\n\n\u003e Write a function that computes the list of the first 100 Fibonacci\n\u003e numbers. By definition, the first two numbers in the Fibonacci\n\u003e sequence are 0 and 1, and each subsequent number is the sum of the\n\u003e previous two. As an example, here are the first 10 Fibonnaci\n\u003e numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, and 34.\n\n### Problem 4 ###\n\n\u003e Write a function that given a list of non negative integers,\n\u003e arranges them such that they form the largest possible number. For\n\u003e example, given [50, 2, 1, 9], the largest formed number is 95021.\n\n### Problem 5 ###\n\n\u003e Write a program that outputs all possibilities to put + or - or\n\u003e nothing between the numbers 1, 2, ..., 9 (in this order) such that\n\u003e the result is always 100. For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 =\n\u003e 100.\n\n## Test ##\n\n    $ gradle test\n\n## Commentary ##\n\nNope, I didn't solve these problems in less then 1 hour. :) Mostly\nbecause I was doing this at the weekend and I had plenty of other\nthings to do.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexim%2Ffive-programming-problems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexim%2Ffive-programming-problems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexim%2Ffive-programming-problems/lists"}