i'm bored, so let's see how many of you can code. :)
I will propose a few programming challenges, first to complete one gets the prize described.
BTW: You can use any programming language unless otherwise specified. Scripting languages tolerated will be limited to Linux bash but you must create your own functions.You must use proper syntax, spacing, and indentation. No one line can exceed 80 characters of code. "Pseudo-code" not accepted.
Your answer will be chosen based on the following criteria:
1.) Best practices.
2.) Clean/easy to read code.
3.) Time complexity where applicable.
EDIT: Entries MUST be hardware and OS agnostic. :)
Note: You will be told why your work was not accepted as a vaiid answer should that be the case.
Most of these should be fairly simple and are usually considered introductory level problems. Have fun. :)
*******************************************
Round 2!
OK, so Round 1 was a success and also served to show that we have a decent programming level, so I'm going to set up the following challenges:
Challenge #4: (PRIZE: 25 mill)
Design an app or a script that scrapes torn. It must return the name for any give ID.
For example:
scrapeTorn(3901) should return "Dash"
The function name is just a suggestion you can call it whatever you want.
*******************************************
CHALLENGE #5: (PRIZE 30 MILL)
Design a function that determines the best possible route from any point to another point in the following map (node structure):
Node A is connected to Node B, Node C and Node E
Node B is connected to Node D, Node E, Node A and Node C
Node C is connected to Node B, Node A and Node E
Node D is connected to NodeB, Node F and Node G
Node E is connected to Node B, Node C, Node G, Node A and Node H
Node F is connected to Node D
Node G is connected to Node D, Node E and Node I
Node H is connected to Node E and Node I
Node I is connected to Node G and Node H
Here's an illustration:
[image: sleepyengineer.com]This is an introductory level AI course problem. It is often referred to as a path finder. The best path will be determined by one that travels through the least amount of nodes in order to get to a destination without repeating a node (meaning you shouldn't have to return to a node once you've been there).
For example:
To get from point A to point G the following routes exist:
A -> B -> C - > E -> G = 5 nodes
A -> C -> B -> E -> G = 5 nodes
A -> B -> E -> G = 4 nodes
A -> C -> E -> G = 4 nodes
A -> B -> D -> G = 4 nodes
A -> E -> G = 3 nodes (best route)
GL, HF!