×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

Jabber's English Note---optimal

本文发表在 rolia.net 枫下论坛Here is a quiz: There are 8 balls of the same size and color. One of the balls is heavier than others. Given a scale, how many times do you need to weigh these balls to identify that heavier one?

If you are asked similar questions in a job interview, you should be careful. It is not easy to come up with an optimal answer. It seems to me that the answer itself is not very important at all.

I was asked a similar question in my most recent job interview. I told the person who asked the question, "I'm not smart enough to jump to the optimal anaswer. As I a programmer, I need to take a systematic approach. First of all, I need to carefully understand your problem. I would like to put it into a module and define a flexible interface. I will make my module applicable not only to your special case, but also to the generale case. Then, I am gonna implement a not-smart solution so that the possible user of my module can have something at hand. Then, I am gonna drill down and try to optimize my solution. But this should be transparent to the user. I hope this is a more reasonable approach to the problem."

Usually, if you have a problem, we can give an answer. Then, we need to refine our solution. This process is called optimization in the software engineering. The better, more economical, and more efficient solution is called the optimal solution.

I know a lot of programmers know these trivia.更多精彩文章及讨论,请光临枫下论坛 rolia.net
Sign in and Reply Report

Replies, comments and Discussions:

  • 工作学习 / English / Jabber's English Note---optimal
    本文发表在 rolia.net 枫下论坛Here is a quiz: There are 8 balls of the same size and color. One of the balls is heavier than others. Given a scale, how many times do you need to weigh these balls to identify that heavier one?

    If you are asked similar questions in a job interview, you should be careful. It is not easy to come up with an optimal answer. It seems to me that the answer itself is not very important at all.

    I was asked a similar question in my most recent job interview. I told the person who asked the question, "I'm not smart enough to jump to the optimal anaswer. As I a programmer, I need to take a systematic approach. First of all, I need to carefully understand your problem. I would like to put it into a module and define a flexible interface. I will make my module applicable not only to your special case, but also to the generale case. Then, I am gonna implement a not-smart solution so that the possible user of my module can have something at hand. Then, I am gonna drill down and try to optimize my solution. But this should be transparent to the user. I hope this is a more reasonable approach to the problem."

    Usually, if you have a problem, we can give an answer. Then, we need to refine our solution. This process is called optimization in the software engineering. The better, more economical, and more efficient solution is called the optimal solution.

    I know a lot of programmers know these trivia.更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • great
    • thanks alot!
    • we give a tentative solution and optimize it.
    • Great, thanks for sharing!... ... (心里嘀咕:烦,你想要什么就直说嘛,你不说我怎么知道呢)
    • yeah, here is a quiz too: 1 + 1 = ?
      • Well, it depends. If radix is 10, 1+1 =2; if we use binary numbers, 1+1 =10.
      • 1+1? depends on your space? In Eucline space, it is 2.
    • I know what you want to put by this little quiz.But Is that what the interviewer really want to hear?Maybe he/she just expects a general answer in commen sense.Anyway,how did he/she think about your smart answer then?
      • I got the job. That's it. I am a slow guy. I didn't think I could work out the answer. So I tried to talk him away---bring his attention to something else. It is a kind of strategy interview. Not mention a smart answer.
        • 我相信你过去给别人的面试对你自己被别人面试应该是有所帮助的。