Tencent QQ PHP Programmer interview title Finishing _php Digest

Source: Internet
Author: User
Tags garbage collection php source code
Say in front:
1, the following topics, in addition to programming tasks, other than the need to write on the papyrus provided to you. Paper is a precious earth resource, please save the use. Programming tasks in the corresponding environment, will require the machine to write, there is no condition, it can only be written on the papyrus.
2. Time:
Basic Task + Advanced task + Design task = 90 minutes
Programming tasks = 60 Minutes

Basic tasks:
1, please list the UNIX signals you can think of and explain the purpose of the signal.
2, please enumerate, you can think of all the string lookup algorithm, and add a comment simple description.
3, there is an IP address (192.168.0.1), please write out its 32-bit unsigned integer form.
4, write, you can think of all the HTTP return status values, and explain the purpose (such as: return 404 means that the page could not be found)

Basic tasks-optional (get extra score):
1, draw a few of your most familiar server-side model out (format is not important, as far as possible the picture clear, explain the idea can)

Advanced tasks:
1, what is the garbage collection mechanism of PHP?
Description
1 If you are familiar with PHP source code, then please start from the source code, answer some questions, will get extra points
2 If you are not familiar with PHP source code, then do your best to write more things, including the use of their own programming intuition to get information, can be.
3) Yes, there are points, errors do not buckle, do not write no points.
2, please write HTTP headers, and meet the following requirements:
1) This is a POST request
2) Goal: Http://www.example.com:8080/test
3) Post variable:
Username:test
Pwd:test2
Intro:hello world!
4) contains the following cookie information:
Cur_query:you&me
Description
1 If you do not remember an HTTP protocol in the command word, then, but this is the use of "Chinese characters" instead.
2 If you can remember more HTTP protocol instructions, then write a few more words, there is always no harm, right?
3 most critical, just draw the correct "contour" (remember HttpWatch and other tools to print out the head?) That's what "silhouette" means, and there will be points, but it would be a shame if the contours were written wrong.

Design tasks:
1, there are always people harassing our voting module, you need to design a voting restrictions of the Dongdong
Requirements are as follows:
1 Request each QQ number (suppose this QQ number can say in UNIT32) 10 minutes This only can cast 5 votes.
2 Our users are very enthusiastic, on average 20 million people per day to vote through this procedure.
Description
1 do not need to write code, only want to map and text can be.
2 for the key logic, please use the diagram code to express, which is also a test of your ability to express words.
3 List all the boundary conditions you can think of, which is a test of your logical thinking and agility.
4 Storage section, do what you can. If, you need a storage layer of your own design, then the implementation of this storage layer, with text + picture way to describe clearly, if the design is reasonable, you will get gorgeous award points.

Programming tasks:
1. We were in big trouble, a new missionary annoyed God, and God was angry and asked us to memorize the Bible (bbe.txt) until he said which word, we would quickly answer the word in the first few lines of the word position. I hear you are a good programmer, so 髟 help us to complete this impossible task.
Requirements are as follows:
1/myworks/example/bbe.txt,98 version of the English Bible
2 input part requirements as follows: PHP./example.php [Word]
3 The output is as follows: [Word] 1,2 2,4 5,6 said: This word in 1 rows 2 columns (second word), 2 rows 4 columns ...
Description
1 This text 4MB ...
2 The meaning of the word: a string consisting of an English letter (case), a number (0-9)
3 provided to your machine OS for Ubuntu 9.10, memory only 1 g, and, unfortunately, 700M is used to do other
4 on the computer test does not allow the Internet, but I installed a man document and read CHM and PDF Reader, in the PC's desktop CHM folder, there is a corresponding PHP reference manual
5 algorithm complexity requirements can not be greater than O (n^2) (is the square of N)
6) What? PHP is inefficient and not easy to use, OK, you can do it in other languages. But note: only python 2.4/perl 5.8/gcc[g++] 4.1 is available on your machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.