Stepping aside from this heavy discussion to a lighter moment ;) ... I guess an interview question like "How do you divide by 2 without using the divide function?" is probably not intended to test your knowledge but to test other desirable skills/qualities, and the way you answer it would tell something about your personality. Perhaps there is a wittier answer to it than the obvious "multiply by half" or the dull "not possible".

Reminds me of this incident ... my brother was once asked this question towards the end of an interview for a programmer job,
Q.: What is the probability of picking a red ball from a bag containing equal number of red and blue balls?
A.: 0.5
Q: Ok. How would you increase the probability of picking a red ball from the bag?"

Without going into the theory of probability to explain that there wasn't a fair way to do so, he just replied jokingly, "Paint one of the blue balls red".


In reply to Re^3: Stop with the interview questions already by arun_kom
in thread Stop with the interview questions already by ssandv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.