Easy Puzzle Mountain problem
Moderator: General Moderators
Easy Puzzle Mountain problem
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
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
Yes
But if you happen to see this kind of problem before, it would be nice to give me some hints, right?feyd wrote:I don't see how this is a database question.
Also, we don't normally do peoples' homework for them.
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...
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
It is about code internalization
Those web application are mainly developed with PHP.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.
The company wanted to convert the english version to other languages as well. For example, Chinese, Japanese...
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!
You are just joking, right?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?
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!
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.wtt wrote:You are just joking, right?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?
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?
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!
onion2k wrote: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.wtt wrote:You are just joking, right?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?
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?
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!
I have no idea where I learnt it. I've been developing internet apps for over 10 years, it's just something I know.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.
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
You might want to try this link: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
http://www.cl.cam.ac.uk/~mgk25/unicode.html
The Answer
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.
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.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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
http://en.wikipedia.org/wiki/UTF-8#Adva ... advantages
facebook probelm..
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.
As someone posted a reply above, figure it out by yourself if you really want to get a job there.
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.