24

Ok I guess I can feel good about myself... didn't use switch though..

Comments
  • 4
    Google, here I come! 😁
  • 9
    I love this problem, as there are so many ways of solving it. I do think this is still my favorite: https://github.com/EnterpriseQualit...
  • 1
    Show me the way you solved it! @Duplexchipmunk
  • 3
    @andalion probably a for loop with 3 if statements checking i%3 and i%5. 9 lines should cover it unless I'm picturing it wrong
  • 1
  • 1
    @andalion yeah it's close to what I was thinking no need to start from 0 in that case though
  • 1
    Where is this exercise from? I want to do a bunch of these
  • 0
    Lookup the enterprise Java version :)
  • 2
    @leviwhalen I've seen the exact same one at Coding Dojo in Seattle.
  • 2
    You're entirely right... I read it a second time just to see if they forbid use of loops or something...

    If so many fail on such an easy task, I must be a genius..
    @jckimble
  • 2
    @BartBB It's more a way to filter out CS students that only took theory classes and never actually wrote real lines of code. Unfortunately it's still possible to get a degree with very little actual coding, so something this simple can serve as a quick check. It's now so famous you're unlikely to see it in an interview.
  • 1
    @leviwhalen get eloquentjavascript pdf
  • 1
    I think its a job intervirw standart @W1ckeD
  • 0
    Just learning @psudo
  • 0
    I see. I, myself, am not a CS student and I had never been interviewed to a company (at least not to work in a software related position) so I do not know what the interviews are like. @psudo
  • 1
    @psudo until very recently I was a university teacher and one of my subjects was OOP. After seeing what was covered the year before by the previous tutor I was appalled at the lack of coding and the clear lack of understanding the tutor had. My entire year and class worked on mini projects then one big class project together. They achieved a lot. It is sad some educational establishments allow for such a lack of actual practical work.
  • 0
    @W1ckeD where is coding dojo!?
  • 0
    @andalion Very well could be, yes.
Add Comment