Page 1 of 1
Easy Puzzle Mountain problem
Posted: Tue Mar 27, 2007 4:47 pm
by wtt
Hello everyone,
Did you guys work on UTF-8 before? If so, could you take a look at the problem below. I'd like to hear your thoughts about tackling this kind of problems.
It is about the software internalization. I couldn't find the specific group to ask, so I ask here and I hope you don't mind.
////////////////////////////////////
//////////////
////////////
Easy Puzzle Mountain
Part 1:
How many bytes long is the sequence for the code point whose UTF-8 representation begins with 0xE3?
Part 2:
0xA9 0xE3 0xB4 0xB1 0x54 0x98 0xB4 0x77
0x88 0x01 0xB2 0x8E 0x5D 0xAA 0xBB 0x66
0x9A 0xC4 0xB2 0x3F 0x8C 0xA3 0xDF 0xA0
0x90 0x4A 0x83 0x90 0x00 0xA2 0xA7 0x94
0x83 0x5C 0x5B 0x86 0x91 0xBF 0xAA 0x60
0xA1 0x47 0x89 0xB2 0xC4 0x89 0x50 0x99
Decode the puzzle and send the answer to Part 1
Posted: Tue Mar 27, 2007 5:25 pm
by feyd
I don't see how this is a database question.
Also, we don't normally do peoples' homework for them.
Yes
Posted: Tue Mar 27, 2007 5:41 pm
by wtt
feyd wrote:I don't see how this is a database question.
Also, we don't normally do peoples' homework for them.
But if you happen to see this kind of problem before, it would be nice to give me some hints, right?
Actually it is not homework problem. It is job interview problem... I wanted to learn more about Php, but it is always nice if I can get a job first...

Posted: Tue Mar 27, 2007 6:01 pm
by jayshields
It has almost nothing to do with PHP. If you're going for a PHP job interview and they are asking you stuff like that then I would be wondering if the employer really knew who he was looking for.
It is about code internalization
Posted: Tue Mar 27, 2007 6:03 pm
by wtt
jayshields wrote:It has almost nothing to do with PHP. If you're going for a PHP job interview and they are asking you stuff like that then I would be wondering if the employer really knew who he was looking for.
Those web application are mainly developed with PHP.
The company wanted to convert the english version to other languages as well. For example, Chinese, Japanese...
Posted: Tue Mar 27, 2007 6:16 pm
by onion2k
The correct answer to that "puzzle" is "Can you please explain the question in plain English?". If they answer no then run a mile from that company because what you see in an interview is always representative of what you'll see in the job even if the interviewer denies it. Do you really want to work with cryptic specifications you have to spend ages working out?
wow, i found guru here!
Posted: Tue Mar 27, 2007 6:20 pm
by wtt
onion2k wrote:The correct answer to that "puzzle" is "Can you please explain the question in plain English?". If they answer no then run a mile from that company because what you see in an interview is always representative of what you'll see in the job even if the interviewer denies it. Do you really want to work with cryptic specifications you have to spend ages working out?
You are just joking, right?
How did you do that? Could you give me some links, so I can look on this problem?
Also, How to tackle the part 1 question?
Re: wow, i found guru here!
Posted: Tue Mar 27, 2007 6:30 pm
by onion2k
wtt wrote:onion2k wrote:The correct answer to that "puzzle" is "Can you please explain the question in plain English?". If they answer no then run a mile from that company because what you see in an interview is always representative of what you'll see in the job even if the interviewer denies it. Do you really want to work with cryptic specifications you have to spend ages working out?
You are just joking, right?
How did you do that? Could you give me some links, so I can look on this problem?
Also, How to tackle the part 1 question?
You misunderstood. I haven't solved the puzzle. I'm saying that if you're presented with a question like that then the correct course of action is to ask for a better explanation. It's a stupid puzzle that's probably very simple if you've tackled that sort of thing before, but rather cryptic if you haven't.
Anyway, if you really want to solve it, the answer to the first question is "3 bytes". 16 bit UTF8 characters are always 3 bytes long and start with an E.
Re: wow, i found guru here!
Posted: Tue Mar 27, 2007 6:49 pm
by wtt
onion2k wrote:wtt wrote:onion2k wrote:The correct answer to that "puzzle" is "Can you please explain the question in plain English?". If they answer no then run a mile from that company because what you see in an interview is always representative of what you'll see in the job even if the interviewer denies it. Do you really want to work with cryptic specifications you have to spend ages working out?
You are just joking, right?
How did you do that? Could you give me some links, so I can look on this problem?
Also, How to tackle the part 1 question?
You misunderstood. I haven't solved the puzzle. I'm saying that if you're presented with a question like that then the correct course of action is to ask for a better explanation. It's a stupid puzzle that's probably very simple if you've tackled that sort of thing before, but rather cryptic if you haven't.
Anyway, if you really want to solve it, the answer to the first question is "3 bytes". 16 bit UTF8 characters are always 3 bytes long and start with an E.
I realized you were kidding.
But, hey, I have to crack this kind of problem to get into the door...
could you let me know whee did you learn them ? "16 bit UTF8 characters are always 3 bytes long and start with an E." I googled, but I couldn't find good resources.
Re: wow, i found guru here!
Posted: Wed Mar 28, 2007 3:14 am
by onion2k
wtt wrote:could you let me know whee did you learn them ? "16 bit UTF8 characters are always 3 bytes long and start with an E." I googled, but I couldn't find good resources.
I have no idea where I learnt it. I've been developing internet apps for over 10 years, it's just something I know.
EDIT: Here's a page that mentions it...
http://en.wikipedia.org/wiki/UTF-8#Rati ... 27s_design ... "If it begins with E, it is 16 bit (expressed in 3 bytes),"
Re: Easy Puzzle Mountain problem
Posted: Wed Mar 28, 2007 9:44 am
by lewmur
wtt wrote:Hello everyone,
Did you guys work on UTF-8 before? If so, could you take a look at the problem below. I'd like to hear your thoughts about tackling this kind of problems.
It is about the software internalization. I couldn't find the specific group to ask, so I ask here and I hope you don't mind.
////////////////////////////////////
//////////////
////////////
Easy Puzzle Mountain
Part 1:
How many bytes long is the sequence for the code point whose UTF-8 representation begins with 0xE3?
Part 2:
0xA9 0xE3 0xB4 0xB1 0x54 0x98 0xB4 0x77
0x88 0x01 0xB2 0x8E 0x5D 0xAA 0xBB 0x66
0x9A 0xC4 0xB2 0x3F 0x8C 0xA3 0xDF 0xA0
0x90 0x4A 0x83 0x90 0x00 0xA2 0xA7 0x94
0x83 0x5C 0x5B 0x86 0x91 0xBF 0xAA 0x60
0xA1 0x47 0x89 0xB2 0xC4 0x89 0x50 0x99
Decode the puzzle and send the answer to Part 1
You might want to try this link:
http://www.cl.cam.ac.uk/~mgk25/unicode.html
The Answer
Posted: Mon Apr 02, 2007 3:34 am
by jsquintz
The answer is....
If you want a job at Facebook figure it out yourself. If you can't figure it out yourself how long do you think you will survive there anyway? The place is filled with Stanford/Harvard/Carnegie Mellon Grads.
Posted: Mon Apr 02, 2007 1:21 pm
by RobertGonzalez
There is some interesting string-length statements and talk about code-points in that wikipedia article as well...
http://en.wikipedia.org/wiki/UTF-8#Adva ... advantages
facebook probelm..
Posted: Mon Apr 09, 2007 4:25 pm
by ltdtl
wtt, I really don't understand how you did not even mention that problem is from facebook's puzzle list.
As someone posted a reply above, figure it out by yourself if you really want to get a job there.
Posted: Tue Apr 10, 2007 3:23 am
by onion2k
If people want to discuss the puzzle itself, or unicode encoding, or whatever then PM me and I'll open the thread again, but as it's moved on to what amounts to snide comments about how the original poster didn't choose to disclose where he got the puzzle from I don't think this topic warrants any further discussion.