challenge

Nico Heid's picture

Java Challenge: Dropping Balloons in Java

Recently I read about a nice article in one of my monthly magazines. I won't give you the author right now, otherwise googling for the solution would be too easy.
He stated it as a possible interview question, but I really like it for the algorithm side of it. It reminded my strongly of some of the
examples given in the book How Would You Move Mount Fuji? Which is excellent by the way.

So your task is to write a Java function which computes the following:Read more

Matthias Reuter's picture

Javascript Challenge: Lotto Number Generator

The German lottery currently holds a jackpot of about 30 million Euro. A friend of mine took the bait and participated yesterday. Since he is a software developer, he wrote a small program to get him six random numbers in the range of 1 and 49.

Well, it's not difficult to write such a programm. The challenge is to do so in little bytes. So I challenge you:

Write a JavaScript function that generates random lotto numbers. This function has to return an array of six different numbers from 1 to 49 (including both) in ascending order. You may use features of ECMA-262 only, that means no Array.contains and stuff. You must not induce global variables.

The function has to look like this

var getRandomLottoNumbers = function () {
    // your implementation here
};
Read more

Syndicate content