Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rexim/five-programming-problems
Solutions for five programming problems every Software Engineer should be able to solve in less than 1 hour
https://github.com/rexim/five-programming-problems
Last synced: 2 months ago
JSON representation
Solutions for five programming problems every Software Engineer should be able to solve in less than 1 hour
- Host: GitHub
- URL: https://github.com/rexim/five-programming-problems
- Owner: rexim
- Created: 2015-05-11T09:22:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-12T06:28:13.000Z (over 9 years ago)
- Last Synced: 2023-03-12T00:56:47.290Z (almost 2 years ago)
- Language: Java
- Size: 132 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Five Programming Problems #
Inspired 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)
## Problems ##
### Problem 1 ###
> Write three functions that compute the sum of the numbers in a given
> list using a for-loop, a while-loop, and recursion.### Problem 2 ###
> Write a function that combines two lists by alternatingly taking
> elements. For example: given the two lists `[a, b, c]` and
> `[1, 2, 3]`, the function should return `[a, 1, b, 2, c, 3]`.### Problem 3 ###
> Write a function that computes the list of the first 100 Fibonacci
> numbers. By definition, the first two numbers in the Fibonacci
> sequence are 0 and 1, and each subsequent number is the sum of the
> previous two. As an example, here are the first 10 Fibonnaci
> numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, and 34.### Problem 4 ###
> Write a function that given a list of non negative integers,
> arranges them such that they form the largest possible number. For
> example, given [50, 2, 1, 9], the largest formed number is 95021.### Problem 5 ###
> Write a program that outputs all possibilities to put + or - or
> nothing between the numbers 1, 2, ..., 9 (in this order) such that
> the result is always 100. For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 =
> 100.## Test ##
$ gradle test
## Commentary ##
Nope, I didn't solve these problems in less then 1 hour. :) Mostly
because I was doing this at the weekend and I had plenty of other
things to do.