puzzle

Christian Harms's picture

facebook Hacker Cup 2012 Qualification Round

The facebook hacker cup is a google-code-jam like coding contest - starting with the 2012 qualification round this weekend. Try to solve the 2011 practice round. If you can submit your solution (the spinner after submit dont stops) try to check the result response with HTTPFox (it shows the correct / incorrect response) - hoping this will be fixed for this weekend.

All solutions can be testet with codejammer.com - a fine javascript solution for running code contests like facebook hacker cup or google code jam.Read more

Christian Harms's picture

10 one-line solutions for project euler

What are one-line solutions?

Solving an problem from project euler can be a challenge or coding fun. The result of every problem is only one number, calculated by an algorithm. Some algorithms can be written as one expression. You get an one-liner if you can embed it in a function with only one line of code.

What is Project Euler?

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

After solving some project euler problems with python I got some one-line solutions with nice usage of list comprehensions and functional programming. These code examples are not clean code but a challenge to find more one-line solutions. This article include my first 10 solutions for project euler as one-line python function. Dont use it to cheating the project - it should be a motivation to find smart coding solutions and participate to project euler. Read more

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

Syndicate content