Live data from Hacker News

Project Euler

projecteuler.net

81–90 of 138 posts

Re: Project Euler

#81
post #29

The best technical interview I ever had involved picking a random Project Euler problem in the hundreds and pair-programming our way through it. The CTO wrote his version in Python and I worked in Perl . . . he was astounded mine ran 8x faster. The same company also had regular hack night where everyone drinks a lot of Tecate, agress on a Project Euler problem and a language no one knows, and races. Fun times.

When I was conducting quantitative interviews I ended up doing the same thing. One of my favorite problems to give was 267 ( http://projecteuler.net/problem=267 ). It has a few "aha" moments but also requires coding to get it done.

Did you use the Kelly Criterion or did you do something else?

Re: Project Euler

#82
post #75
post #19

Earlier quoted context omitted.

In the same vein, spending a couple of hours working Project Euler questions before you go into an interview is a great way to warm up for the types of questions you tend to get in interviews but don't see as much during day-to-day programming.

I think the reason it is a poor choice for interview questions, is like you say, we "don't see [questions like these] during day to day programming".

True, but if you are interviewing, this might be an easy way to have a github repo that has an example of your coding style: comments, function and variable names, etc.

... I am kicking myself that I have never done that.

Re: Project Euler

#83
post #29

The best technical interview I ever had involved picking a random Project Euler problem in the hundreds and pair-programming our way through it. The CTO wrote his version in Python and I worked in Perl . . . he was astounded mine ran 8x faster. The same company also had regular hack night where everyone drinks a lot of Tecate, agress on a Project Euler problem and a language no one knows, and races. Fun times.

> The same company also had regular hack night where everyone drinks a lot of Tecate

I hope the corporate culture is friendly to those of us who choose not to consume alcohol.

Re: Project Euler

#84
A lot of good links to similar sites in this comment thread.

I enjoy Project Euler, but as with many people slowly got annoyed by lack of specific mathematical knowledge as opposed to programming. One thing I believe would really help with this would be a resource that discussed the problem in the abstract. As an example, for most of the programs that rely on using primes, whether it be iterating them (e.g. first 1M primes) or the unique prime factorization of a number, discuss the known algorithms in pseudocode. Perhaps this is a bit much, as I would be satisfied with just knowing the words I need to go find resources for myself. This is what I tend to do anyway after I have taken a fair stab at a problem: "Oh, I'm doing prime factorization. I wonder if there are better algorithms than I have used." Indeed, one resource for this is the forums that are made available after the problem is solved.

Some might see this as ruining the fun, but I would personally have more fun and solve more problems if this was available.

Re: Project Euler

#85
post #29

The best technical interview I ever had involved picking a random Project Euler problem in the hundreds and pair-programming our way through it. The CTO wrote his version in Python and I worked in Perl . . . he was astounded mine ran 8x faster. The same company also had regular hack night where everyone drinks a lot of Tecate, agress on a Project Euler problem and a language no one knows, and races. Fun times.

Sounds neat, but doesn't sound like pair programming to me. Sounds like you designed a solution together and then went and coded it separately? Or did you each code up the solution in front of each other? If so, a fairly interesting thing there would be if the person coding in Python was driving the other, and vice versa for Perl. Then again, that could be very annoying if the person didn't know how to type the language and it just because and exercise in transcription.

Re: Project Euler

#87
post #43

Earlier quoted context omitted.

That's why I like Euler for this, there's no possibility that someone is trying to get some free work out of you.

It's not the "free work," it's asking the candidate to make a large time commitment that she cannot use for pursuing other job opportunities.

> a large time commitment

No. Solving the first 12 PE problems should not take a competent programmer more than 30 minutes.

Re: Project Euler

#88
post #46

Project Euler is great but as others here have said it is very math focused. Can anyone share other programming challenge sites? I saw one the other day here on HN in a comment but can't find it again. The only thing I remember is the problem I checked out was a kind of AI / pathfinding for a "floor cleaning robot" and code was submitted directly in the page. [Edit] Just found it going through my history: https://www…

The UVA Online Judge [1] is one of the largest and oldest programming competition sites on the web. They have a huge library with problems in pretty much any CS area. However it can be a little overwhelming at first, so is better to use UHunt [2], which categorizes problems according to difficulty and area, such as Data Structures, Computational Geometry, String Manipulation, etc.

[1] http://uva.onlinejudge.org/index.php [2] http://uhunt.felix-halim.net/id/339

Re: Project Euler

#89
post #49

Earlier quoted context omitted.

I have to agree that the math is a bit too much. If you feel like doing algorithms / data structures work, though, perhaps leetcode will appeal to you: http://oj.leetcode.com/

I liked the sound of leetcode, but I see the way to answer is with code (C++/Java) instead of a value answer. That ruins it for me. I want to play with new programming languages, and see if the output is correct while I'm at it.

That's true. Another one mentioned in this thread is hackerrank: https://www.hackerrank.com/ - this one offers way more languages, except for rust, the one I'm actually learning :(

Re: Project Euler

#90
post #29

The best technical interview I ever had involved picking a random Project Euler problem in the hundreds and pair-programming our way through it. The CTO wrote his version in Python and I worked in Perl . . . he was astounded mine ran 8x faster. The same company also had regular hack night where everyone drinks a lot of Tecate, agress on a Project Euler problem and a language no one knows, and races. Fun times.

When I was conducting quantitative interviews I ended up doing the same thing. One of my favorite problems to give was 267 ( http://projecteuler.net/problem=267 ). It has a few "aha" moments but also requires coding to get it done.

Hey, who did you interview and for what position? And how many of these people succeeded? I've solved about 50 project Euler problems, but only 1 or 2 with number above 200. I'm not a genius, didn't study maths, but it's imho quite hard to solve any Euler problem at an interview, even if you're a decent thinker. Ok, there are few easy ones, but none of these with 3 digit numbers.
Post reply on HN