Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Developer Applicant Suitability

  • 04-07-2011 8:37pm
    #1
    Closed Accounts Posts: 4,564 ✭✭✭


    Just out of curiosity, has anyone here ever interviewed someone with an advanced degree(s) in CS/IT who failed the FizzBuzz test? I find the claim that people with a degree in these cognate areas could fail the most trivial of tests a bit strange, but then again, nothing would surprise me anymore.

    I once used recursion in an interview test. The guy said something like "wow, we don't see many get this out" and that got me thinking. Recursion is not an advanced concept, why are certain people with degrees unable to solve even the most basic of problems? Any takers?

    If this has happened, why?


«1

Comments

  • Registered Users, Registered Users 2 Posts: 330 ✭✭leahcim


    advanced degree(s) in CS/IT

    It all depends on what was involved in the advance degree, and whether they had commercial experience.

    If a job candidate just finished a PhD and their area of research was something theoretical they probably haven’t done any major programming since their undergrad, maybe 3 years earlier. Showing them some problem and asking them to write a solution in Java or whatever as you watch them might just give them a mental block.

    If somebody has programmed professionally before and is trying to use the fact that they have a PhD to get a more senior role and they cannot solve the most basic of problems will that is a different story, they just might not be good at programming.


  • Registered Users, Registered Users 2 Posts: 2,120 ✭✭✭p


    What's the fizzbuzz test?

    About recursion though, how often do you actually use recursion in everyday programming.


  • Registered Users, Registered Users 2 Posts: 330 ✭✭leahcim


    What's the fizzbuzz test?

    I would say the Naikon is referring to http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Yep. It's a program that prints the numbers from 1 to 100. If the number is a multiple of 3 then print Fizz instead, if its a multiple of 5 print Buzz instead, if its a multiple of both then print FizzBuzz instead.

    I have used recursion, in fact in asp.net if you use findcontrol() to find a control on an aspx page, you're using recursion too. You'll find it in lots of places.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    I've wondered sometimes if it would be a good idea to have a programmers guild, like the trades guilds. Something to demonstrate a reasonable level of competency.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 83 ✭✭fatlog


    recursion can be a funny one. spome developers tend to avoid it as it can make code completely unreadable in some cases. Iactually wouldn't completely judge someones ability on how they deal with a recursive problem

    but then you have things like erlang where its a necessity


  • Registered Users, Registered Users 2 Posts: 83 ✭✭fatlog


    This also reminds me of the whole bitwise operator argument. Lots of the bigger companies use bitwise operator questions in their technical tests.

    Honestly now, how many of you use bitwise operators on a regular basis? I'm not doubting they are extremely hadny to know and show a level of knowledge possibly above the norm. but not knowing bitwise operators does not mean you cannot write code.

    to give another interview example. I was actually told by interviewer that ^ is not a valid operator in PHP! this was a lead developer in php that told me this. couldn't believe it. but it doesn't make him a bad developer.


  • Registered Users, Registered Users 2 Posts: 981 ✭✭✭fasty


    I dunno, traversing a tree is a pretty fundamental example of recursion that I think developers should know about. Of course, they should also know how to flatten a tree to traverse it without!

    I think the OP is right about asking the fundamental stuff, if you *get* data structures and algorithms, all the high level stuff makes more sense too.

    I use bitwise operators quite a lot btw, it's a pretty handy way of encoding information for fast sorting or minimization of state changes.


  • Registered Users, Registered Users 2 Posts: 83 ✭✭fatlog


    fasty wrote: »
    I dunno, traversing a tree is a pretty fundamental example of recursion that I think developers should know about. Of course, they should also know how to flatten a tree to traverse it without!

    perhaps, but should they really be able to reproduce this code while you sit there staring at them?

    for me a verbal explanation showing an understanding of how it would be done is sufficient.

    saying all this though, i would expect someone to be able to do that fizzbuzz test


  • Registered Users, Registered Users 2 Posts: 83 ✭✭fatlog


    fasty wrote: »
    I use bitwise operators quite a lot btw, it's a pretty handy way of encoding information for fast sorting or minimization of state changes.

    i knew there would be one! ;)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 981 ✭✭✭fasty


    Nah, not reproduce by rote, but be able to write out and explain on a whiteboard and answer questions that would satisfy me that they understand what they're talking about? Sure!

    I think those sort of questions are infinitely more useful than asking them stuff about frameworks or high level design patterns and the like.
    fatlog wrote: »
    i knew there would be one! ;)

    Haha, there always is! For what it's worth, I work on stuff that's quite performance intensive these days and certainly profiled before I started optimizing!


  • Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭Nulty


    Really interesting discussion.

    I'm not a CS grad. I did a Psych degree, learned HTML/CSS and just finished a Web Tech PG Dip in June. I did the FizzBuzz test in ruby in 10 minutes, only because I misunderstood what was being asked. I missed the part
    if its a multiple of both then print FizzBuzz instead.

    I thought It was to print/put FizzBuzz if i is a multiple of neither.

    Anyway, like I said, I didn't do an undergrad in CS and I'm applying for a MSc in CS in UCD (the conversion one) and I'm trying to catch up on as much Bachelors stuff as I can. If anyone can point me to basic things I'd need that would be brilliant.

    Its hard to know what I should know when I don't know what I'm expected to know, you know? :P


  • Registered Users, Registered Users 2 Posts: 89 ✭✭tehjimmeh


    Fizzbuzz? Recursion?
    fizzbuzz n | n `mod` 15 == 0 = "fizzbuzz" : fizzbuzz (n+1)
               | n `mod` 3 == 0  = "fizz" : fizzbuzz (n+1)
               | n `mod` 5 == 0  = "buzz" : fizzbuzz (n+1)
               | otherwise       = (show n) : fizzbuzz (n+1)
    
    take 100 (fizzbuzz 1)
    

    Oh Haskell, how I love you so...

    Being able to read and write recursive programs should be an absolute necessity for anyone looking to get hired by any decent company. It's slightly headwrecking to begin with but ultimately, really basic stuff.


  • Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭Nulty


    Ruby, Maybe theres a better way to do it but I'm pretty fresh...


    [HTML]for i in 1..100
    print i
    if i%3 == 0 && i%5 != 0
    puts " Fizz"
    elsif i%5 == 0 && i%3 != 0
    puts " Buzz"
    elsif i%3 == 0 && i%5 == 0
    puts " FizzBuzz"
    end
    end[/HTML]

    Edit:

    :( actually thats wrong haha. I got it going in irb though. No, its right, just no newline after each number


    [HTML]for i in 1..100
    print i
    if i%3 == 0 && i%5 != 0
    puts " Fizz"
    elsif i%5 == 0 && i%3 != 0
    puts " Buzz"
    elsif i%3 == 0 && i%5 == 0
    puts " FizzBuzz"
    else puts ""
    end
    end[/HTML]


  • Registered Users, Registered Users 2 Posts: 83 ✭✭fatlog


    tehjimmeh wrote: »
    Fizzbuzz? Recursion?
    fizzbuzz n | n `mod` 15 == 0 = "fizzbuzz" : fizzbuzz (n+1)
               | n `mod` 3 == 0  = "fizz" : fizzbuzz (n+1)
               | n `mod` 5 == 0  = "buzz" : fizzbuzz (n+1)
               | otherwise       = (show n) : fizzbuzz (n+1)
    
    take 100 (fizzbuzz 1)
    

    i like these sort of posts!
    anyone else got any clever solutions? ideally outside the straight forward ifelse method - and without googling it!

    i might give erlang a go but i think it will be fairly similar to this.


  • Registered Users, Registered Users 2 Posts: 1,657 ✭✭✭komodosp


    No you're only supposed to print the number if it's not Fizz or Buzz but why bother checking for both?

    Would this not do?
    for i in 1..100
     if i%3 == 0
      puts "Fizz"
     end
     if i%5 == 0
      puts "Buzz"
     elsif i%3 != 0 
      puts i
     end
     puts " "
    end
    

    BTW I've no idea what puts means! (I presume it means write to the output)

    (edit: I was responding to the post before the last!)


  • Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭Nulty


    komodosp wrote: »
    No you're only supposed to print the number if it's not Fizz or Buzz but why bother checking for both?

    Would this not do?
    for i in 1..100
     if i%3 == 0
      puts "Fizz"
     end
     if i%5 == 0
      puts "Buzz"
     elsif i%3 != 0 
      puts i
     end
     puts " "
    end
    

    BTW I've no idea what puts means! (I presume it means write to the output)

    (edit: I was responding to the post before the last!)

    Ok, well my biggest problem is understanding what I'm being asked to do then. I could obviously do it that way too.

    puts is print with an implied newline or return (\n)


  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    well the previous two posters have failed!


  • Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭Nulty


    Really? How come?


  • Registered Users, Registered Users 2 Posts: 1,657 ✭✭✭komodosp


    puts is print with an implied newline or return (\n)
    Ahh then obviously change all my putses to prints except maybe the last one if you want a new line between each number


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    read the original post on what FizzBuzz is meant to output.


  • Registered Users, Registered Users 2 Posts: 5,015 ✭✭✭Ludo


    komodosp wrote: »
    Ahh then obviously change all my putses to prints except maybe the last one if you want a new line between each number

    No need as the requirements don't mention anything about where to put new lines...if any are required at all...bug against requirements :D


  • Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭Nulty


    amen wrote: »
    read the original post on what FizzBuzz is meant to output.

    Evil Phil wrote: »
    Yep. It's a program that prints the numbers from 1 to 100. If the number is a multiple of 3 then print Fizz instead, if its a multiple of 5 print Buzz instead, if its a multiple of both then print FizzBuzz instead.

    <snip>


    ok,

    [HTML]for i in 1..100
    if i%3 == 0 && i%5 != 0
    puts " Fizz"
    elsif i%5 == 0 && i%3 != 0
    puts " Buzz"
    elsif i%3 == 0 && i%5 == 0
    puts " FizzBuzz"
    else
    puts i
    end
    end[/HTML]

    Now, that works.


  • Registered Users, Registered Users 2 Posts: 89 ✭✭tehjimmeh


    Hurray!

    Now lets all write stupid solutions for lulz!
    switch(i%15)
    {
       case 3:
       case 6:
       case 9:
       case 12:
          printf("Fizz\n");
       break;
    
       case 5:
       case 10:
          printf("Buzz\n");
       break;
    
       case 0:
          printf("FizzBuzz\n");
       break;
    
       default:
          printf("%d\n",i);
    }
    


  • Registered Users, Registered Users 2 Posts: 1,311 ✭✭✭Procasinator


    tehjimmeh wrote: »
    Hurray!

    Now lets all write stupid solutions for lulz!
    for (var i = 1; i < 101; i++) console.log(((((i%3) && " ") || "Fizz")+((i%5) && " " || "Buzz")).replace(/^\s*/, "").replace(/\s*$/, "") || i);
    

    Javascript, prints to console for browsers that have it.


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    Gonna have to put up a brain **** version. Probably already exists mind you. That must be one of the smallest turing complete languages, no doubt.


  • Registered Users, Registered Users 2 Posts: 6,790 ✭✭✭cornbb


    Nulty wrote: »
    ok,

    [HTML]for i in 1..100
    if i%3 == 0 && i%5 != 0
    puts " Fizz"
    elsif i%5 == 0 && i%3 != 0
    puts " Buzz"
    elsif i%3 == 0 && i%5 == 0
    puts " FizzBuzz"
    else
    puts i
    end
    end[/HTML]

    Now, that works.

    Its more efficient if you check for the "i == 3 && i ==5" case first. That way if it resolves as false, you don't need to check for " && i%3 != 0" or " && i%5 == 0" later, and the code becomes more efficient.
    for (int i = 1; i <=100; i++) {
    	if (i%5 == 0 && i %3 ==0)
    		print FizzBuzz
    	elsif (i%3 == 0)
    		print Fizz
    	elsif (i%5 == 0)
    		print Buzz
    	else
    		print i
    	print "\n"
    }
    

    Edit: please excuse my mix of C++ and pseudocode...


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    cornbb wrote: »
    for (int i = 1; i <=100; i++) {
    	if (i%15 == 0 )
    		print FizzBuzz
    	elsif (i%3 == 0)
    		print Fizz
    	elsif (i%5 == 0)
    		print Buzz
    	else
    		print i
    	print "\n"
    }
    

    Edit: please excuse my mix of C++ and pseudocode...

    The LCM of 3 and 5 is 15. I just use that instead for the first case:cool:


  • Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭Nulty


    Thanks cornbb. Makes sense. I'm working hard to catch up. :)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 89 ✭✭tehjimmeh


    Looking at it again, if we're talking in terms of efficiency, this isn't too bad a solution, actually - only one modulus calculation per iteration :)

    Of course, trying to make that more efficient is a bit stupid (unless code size is an issue I guess). Any decent compiler is going to unroll that loop, propagate constants, fold expressions, remove redundant branches and end up with assembly equivalent to 100 print statements ;)


  • Registered Users, Registered Users 2 Posts: 11,989 ✭✭✭✭Giblet


    Well if you want efficiency, you might as well hardcode the output as it's a constant B)


  • Registered Users, Registered Users 2 Posts: 221 ✭✭Elfman


    For cnt = 0 To 100
    printme = ""
    printme &= IIf(i Mod 3 = 0, "FIZZ", "")
    printme &= IIf(i Mod 5 = 0, "BUZZ", "")
    Console.WriteLine(printme & " - " & cnt)
    Next


  • Registered Users, Registered Users 2 Posts: 9,153 ✭✭✭everdead.ie


    Elfman wrote: »
    For cnt = 0 To 100
    printme = ""
    printme &= IIf(i Mod 3 = 0, "FIZZ", "")
    printme &= IIf(i Mod 5 = 0, "BUZZ", "")
    Console.WriteLine(printme & " - " & cnt)
    Next
    I like this implementation but if people can't create a single for loop with 2/3 if else statements surely that's a problem.


  • Registered Users, Registered Users 2 Posts: 2,089 ✭✭✭henryporter


    Funny how the thrown gauntlet has been accepted by most of the posters (including me) per the follow up article on Coding Horror: http://www.codinghorror.com/blog/2007/02/fizzbuzz-the-programmers-stairway-to-heaven.html :D


  • Registered Users, Registered Users 2 Posts: 1,657 ✭✭✭komodosp


    Elfman wrote: »
    For cnt = 0 To 100
    printme = ""
    printme &= IIf(i Mod 3 = 0, "FIZZ", "")
    printme &= IIf(i Mod 5 = 0, "BUZZ", "")
    Console.WriteLine(printme & " - " & cnt)
    Next

    You're not supposed to print the number if "Fizz" or "buzz" or "fizzbuzz" is being printed...


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭oeb


    Just to be annoying, PHP.

    [PHP]for($i=1;$i<=100;$i++){$o='';$o.=!($i%3)?'Fizz':'';$o.=!($i%5)?'Buzz':'';$o=!$o?$i:$o;echo $o.'<br />';}[/PHP]


  • Registered Users, Registered Users 2 Posts: 1,477 ✭✭✭azzeretti


    And in Perl (I like these tests - any more!?)
    my @numbers = (1..100);
            foreach my $i (@numbers)
              {
                my $res3 = $i/3;
                my $res5 = $i/5;
                    if($res3 =~ /^\d+$/ && $res5 =~ /^\d+$/) {print "FizzBuzz for $i\n"}
                        elsif($res3 =~ /^\d+$/)
                         {print "Fizz for $i\n";}
                        elsif($res5 =~/^\d+$/)
                        {print "Buzz for $i\n"}
                        else {print "$i\n"}
    }
    
    
    


  • Registered Users, Registered Users 2 Posts: 40,038 ✭✭✭✭Sparks


    Just to be really annoying, can I give y'all the second part of the FizzBuzz test (the one that really counts at any company that does any sort of real product)?

    Here it is : Document your solution.

    You'd be horrified at how many grads can't do this, but honestly, every time someone on here asks "what programming language should I study to boost my career", the very first one that always jumps to mind is English. Because if you don't document it, you'll probably come across it in a Coding Horrors thread or WTF post someday...


  • Registered Users, Registered Users 2 Posts: 1,311 ✭✭✭Procasinator


    Sparks wrote: »
    Just to be really annoying, can I give y'all the second part of the FizzBuzz test (the one that really counts at any company that does any sort of real product)?

    Here it is : Document your solution.

    You'd be horrified at how many grads can't do this, but honestly, every time someone on here asks "what programming language should I study to boost my career", the very first one that always jumps to mind is English. Because if you don't document it, you'll probably come across it in a Coding Horrors thread or WTF post someday...

    Out of curiosity, how would you document the solution? It's such as simple task, the most I would document is the why not the how. And for FizzBuzz, there is no why except for because you were asked too.

    Why would you want to document the modulus operator, when the language reference already does?


  • Registered Users, Registered Users 2 Posts: 40,038 ✭✭✭✭Sparks


    Out of curiosity, how would you document the solution?
    Mod note: This developed into a good but divergent thread of it's own, so I've split it out to here...


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭oeb


    On a similar line to the FizzBuzz test, but also showing a bit of an ability to think outside the box, I saw an interview question online yesterday that went something along the lines of.
    Write a short function in the language of your choice. When given one integer, it must return the square of that number. You may NOT use the multiplication operator or any math functions that your language may provide.

    There are a couple of ways to do this.


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    oeb wrote: »
    On a similar line to the FizzBuzz test, but also showing a bit of an ability to think outside the box, I saw an interview question online yesterday that went something along the lines of.
    Write a short function in the language of your choice. When given one integer, it must return the square of that number. You may NOT use the multiplication operator or any math functions that your language may provide.

    There are a couple of ways to do this.


    return input^2


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    My point is that, in addition to its vagueness, I don't really like the question.


    The point of FizzBizz is to be the most casual filter possible: ask something that anyone who can code *has* to be able to do.


    This question is going to be off the beaten track for a lot of general developers. Like, when would they ever not have a multiply operator?


    Do they want the candidate to make a binary multiplier using bitwise operations in C? That's kind of error prone, and a PITA thing to do in an interview. It demonstrates a detailed knowledge of bitwise operations, if that's a particularly desirable quality; great question for someone working with embedded systems, but I'm not sure you need that in a general developer these days.


    I can think of a load of other stupid ways to solve the problem, too, using the division operator; building lookup tables; defining a language so trivial the only numbers in it are 0 and 1; etc.

    Maybe there's some solution I've overlooked that they are looking for; if so, my point stands; I'm not a fan of 'ah-ha' questions.


  • Closed Accounts Posts: 2,256 ✭✭✭Molly


    I think you're over complicating it a bit. I wasn't sure was this supposed to work for negative numbers so I made it work with them anyway. I actually think it's a decent enough test for problem solving. I also believe that a lot of software development is asking the correct questions before you dive headfirst into things so a developer being interviewed and asked about the negative numbers would to me show some sign of 'looking before they leaped'
    	public int square(int number){
    		int copyOfNumber = 0;
    		
    		if(number >  -1){
    			copyOfNumber = number;  
    		} else {
    			copyOfNumber = 0 - number;
    			number = copyOfNumber;
    		}
    
    		for(int i=1;i<copyOfNumber;i++){
    			number += copyOfNumber;
    		}
    		return number;
           }
    


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭oeb


    The quick and dirty approach that I would have taken to the question myself would have been:

    [PHP]
    function squareMe($x) {
    return $x / (1/$x);
    }
    [/PHP]


  • Closed Accounts Posts: 2,256 ✭✭✭Molly


    I like that. It's really simple


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    It's a stupid gimmick question. You can't use multiplication but you can use everything else? Division is just multiplication by the inverse so it's stupid. Compiler would turn divide into inverse multiply anyway -.-

    Most likely they expect the candidate to use bitwise operations or something.

    I interviewed for a position in London last summer, HR drone placed a sheet fully of the usual stupid questions in front of me and told me I had an hour to complete the test. Questions were stuff like "write heapsort" and so on. I last studied that stuff in the 90s.... No I cannot remember heapsort!! Yeah you gotta make a "heapify" function lalala. Anyway, I just got up and said "Thank you for your time", and left. This is not how you interview a developer with 10+ years of experience -.-

    Contrast to next interview (for financial consultancy). Phone interview first, guys described the specific problem they wanted to hire someone to solve. I flew over for face-to-face interview, brought laptop with demo of a rough solution to what they wanted. Wallop -> instantly employed. No HR drones in sight.


  • Registered Users, Registered Users 2 Posts: 1,477 ✭✭✭azzeretti


    oeb wrote: »
    The quick and dirty approach that I would have taken to the question myself would have been:

    [PHP]
    function squareMe($x) {
    return $x / (1/$x);
    }
    [/PHP]

    Didn't it say you can use any mathmatical functions?


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Yeah but it's very vague. They mean functions like pow(x, 2) I suppose. + - etc are operators not functions.


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    azzeretti wrote: »
    Didn't it say you can use any mathmatical functions?

    Well, this depends on the semantics you wish to attach to 'function' vs 'operator'.
    So you can answer trivially by choosing a language with an exponentiation operator and saying 'well this isn't multiplication', or a function.

    Which I think is a silly answer to a silly question.

    Molly wrote: »
    I think you're over complicating it a bit. I wasn't sure was this supposed to work for negative numbers so I made it work with them anyway. I actually think it's a decent enough test for problem solving. I also believe that a lot of software development is asking the correct questions before you dive headfirst into things so a developer being interviewed and asked about the negative numbers would to me show some sign of 'looking before they leaped'
        public int square(int number){
            int copyOfNumber = 0;
            
            if(number >  -1){
                copyOfNumber = number;  
            } else {
                copyOfNumber = 0 - number;
                number = copyOfNumber;
            }
    
            for(int i=1;i<copyOfNumber;i++){
                number += copyOfNumber;
            }
            return number;
           }
    
    This produces the correct result, but is linear in input size.
    Getting the square of a billion will take a while; implementing a bitwise binary multiplier is a better solution, although a PITA.

    srsly78 wrote: »
    It's a stupid gimmick question. You can't use multiplication but you can use everything else? Division is just multiplication by the inverse so it's stupid. Compiler would turn divide into inverse multiply anyway -.-


    I agree its a stupid gimmick question.
    oeb wrote: »
    The quick and dirty approach that I would have taken to the question myself would have been:

    [PHP]
    function squareMe($x) {
    return $x / (1/$x);
    }
    [/PHP]


    I'm not sure about the turning divide into inverse multiply - it said you had to take an integer - it didn't say whether it was integer multiplication, but if it was, there's a difference.


    Probably the best solution (fastest, non-trivial) to the problem would be to use float inverse division (assuming thats allowed), and then search near the solution for what the correct integer value would have been.

    There was a question in the facebook hacker cup that had to be solved in that sort of way.

    If thats not allowed, binary multiplier - but meh.


  • Advertisement
Advertisement