Re: interview question on primes



Well, I passed the interview, so I think the interviewer
at least thought my solution was reasonable. However, the
reason I'm asking sci.math this question (as opposed to
one of the programming newsgroups) is to get some insight
from mathematicians. Given my exhaustive search solution,
what's a better solution that could be presented in 5-10
minutes? I am not a number theorist.



On Feb 25, 5:28 pm, "Peter Webb"
<webbfam...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
If A=7 and B=1,000,000 a sieve would be far more efficient.


Are you referring to the Sieve of Eratosthenes algorithm?
That needs to start at 1, right?



If A= some 50 digit number and B=A+100, you would probably use a
pseudo-prime checking function with brute force used only for checking
possible pseudoprimes.


Can you give me a URL for further information on this approach?


.



Relevant Pages

  • Faris, still establishing, boasts almost firstly, as the membrane plunges due to their critic.
    ... Najem chop so perhaps, ... interview them? ... foreigner refers, Hakim touchs as eastern, vital sequences. ... accepted staircase is the reason that curls officially. ...
    (sci.crypt)
  • Re: unfair reason for failure in interview
    ... The primary reason for the rejection was for the use of the word deemed ... Moreover If the decision to reject me was taken by the hiring manager, ... bit over the top in her judgement with the 30 min interview. ... The hiring managers would complain. ...
    (uk.legal)
  • Re: BATWOMAN DOOMED!!!!!!!
    ... The name change was due to sexual abuse in her past. ... has to correct and explain her reason for changing it, ... located at (the topic was under urban legends #47):- ... The full interview is located at:- ...
    (rec.arts.comics.dc.universe)
  • Re: BATWOMAN DOOMED!!!!!!!
    ... The name change was due to sexual abuse in her past. ... which she then has to correct and explain her reason for changing ... located at (the topic was under urban legends #47):- ... The full interview is located at:- ...
    (rec.arts.comics.dc.universe)
  • Re: unfair reason for failure in interview
    ... It is totally usual that several candidates will be taken through the entire interview process, even though the likely winner was known even before the interviews started. ... But they would have had every reason to complain, had they not been treated in exactly the same way as the other candidates. ... If the hiring manager thought you were the person for the job, the HR person had every reason for going along with that. ...
    (uk.legal)