11

I am writing this question putting myself at risk of massive down voting. But I still want to risk it as I was really curious and I want to know what's an elephant number.

2 days ago, there was a new user who posted a question on How to tell if a number is an elephant number?

He mentioned that this was asked in his interview.

For those who have seen this question before it was deleted, could you please tell me what is an elephant number??

Community
  • 1
  • 1
user3437460
  • 17,253
  • 15
  • 58
  • 106
  • My guess would be a number that is too large to represent in a standard integral type (`char`, `short`, `int`, `long`, `long long`), but that is just a guess. – Graznarak Apr 04 '14 at 18:59
  • 3
    'If you begin to see elephants dancing and singing during a performance, then that part of the play is what is referred to as an "elephant number"' (c) @0x499602D2 – raina77ow Apr 04 '14 at 19:02
  • [Here's the original question.](http://webcache.googleusercontent.com/search?q=cache:6hJQdVJh6qsJ:stackoverflow.com/questions/22819346/how-to-tell-if-a-number-is-an-elephant-number+&cd=1&hl=en&ct=clnk&gl=cawebcache.googleusercontent.com/search?q=cache:6hJQdVJh6qsJ:stackoverflow.com/questions/22819346/how-to-tell-if-a-number-is-an-elephant-number+&cd=1&hl=en&ct=clnk&gl=ca) I would guess that they would cast the int to a boolean, but it seems like a badly phrased question. – Adam Apr 04 '14 at 19:03
  • This somehow reminds me of this question: [Proper use cases for Android UserManager.isUserAGoat()?](http://stackoverflow.com/questions/13375357/proper-use-cases-for-android-usermanager-isuseragoat) – donfuxx Apr 04 '14 at 19:05
  • I would recommend asking in http://meta.stackoverflow.com/ next time you are curious about mod action (since deletions are triggered by mods IIRC). – Guvante Apr 04 '14 at 19:09
  • 1
    @Guvante The question doesn't seem to be about mod action, just the definition of an elephant number. And since I too saw the original question and am curious, +1. – cf- Apr 04 '14 at 19:10
  • 1
    The question was put on hold by ordinary user actions; it was deleted with a diamond moderator as the second voter. There was no answer forthcoming. I think it is fair to say that the interviewee should immediately ask the interviewer "I don't think I've heard of an elephant number; how are elephant numbers defined?". – Jonathan Leffler Apr 04 '14 at 19:21
  • Could this be the root of an elephant number: http://magic.about.com/od/libraryofsimpletricks/a/mentalpredict.htm – Thomas Matthews Apr 04 '14 at 20:40

3 Answers3

3

Questions usually don't get deleted, so I would assume that there is no answer to this. Anecdotally, Google refuses to bring up any programming reference to that phrase in the first two pages.

However I could guess what the answer to the question was:

Ask

Many times while programming you are given incomplete information (in fact in nearly every case).

If I had asked that question during an interview I would expect the interviewee to extract the information they needed from me. In this case it appears that they made a question that was impossible to answer on purpose, that way you know they need to ask you for more details.

Guvante
  • 18,775
  • 1
  • 33
  • 64
2

I think I might have found out the possible answer to my own question after a long search.

An interview question on finding maximum number of elephants lived: (Click the blue link below) Given the life time of different elephants, find the period when maximum number of elephants lived

I want to share it with all those who are curious like me!

(P.S: I am thankful..till now.. my question has not been voted to -10!)

Community
  • 1
  • 1
user3437460
  • 17,253
  • 15
  • 58
  • 106
0

As the original question was to implement a function

public boolean isElephant(int elephant){...}

I would have guessed that int elephant is an elephant number, because if it wasn't, it wouldn't be called elephant, would it?

So, my answer would be:

public boolean isElephant(int elephant){ return true; }
Massa
  • 8,647
  • 2
  • 25
  • 26