Perfect World interview, perfect world

Source: Internet
Author: User

Perfect World interview, perfect world

Perfect school recruitment is divided into three positions: c ++, java, game planning

For my C ++ questions, please refer to the basics.


1. A hexadecimal 0xFF 0x80 (only two "bits") is given to convert it into a signed one-byte decimal integer.

Solution: because it is converted to a signed number, you can convert it to a binary value, for example, 0xFF-> 1111 1111.

It can be seen that the symbol bit is 1, which is a negative number, and the negative number is stored as a complement, so the original code is required.

If you subtract one from the complement code, the original code is 1111 1110-> 1000 0001->-1, the symbol bit remains unchanged.

0x80 1000 0000 1 is a negative number. The original code is 0111 1111-> 1000 0000-128.

0x00 0000 0000 the sign bit is 0, that is, the source code 0000 0000-> 0

0x7F 0111 1111 the symbol bit is 0 0111 1111-> 127

0x00 ~ 0x79 is 0 ~ 127 0x80 ~ 0xFF is-128 ~ -1


2. 3*(4 + 6)-7 # Use code to implement this expression

Refer to the inverse Polish formula in the compilation principle.

Data stack d and symbol stack f

In case of a number, the number is written into Stack d, and the number of characters is written into Stack f.

D: 3 4 6

F: * (+

If yes, the symbolic stack goes out of the stack (

D: 3 4 6 +

F :*

Continue to stack

D: 3 4 6 + 7

F :*-

Until the final operator # is encountered, the symbol stack is out of the stack

D: 3 4 6 + 7 -*


At this time, the inverse Polish formula has been set up to complete the operation.

Create an operation stack s, d sequentially output the stack and then enter the stack s

S: 3 4 6

Until the symbol + s is encountered, the stack is pushed out twice in a row.

Calculate 4 + 6-> 10 and then import new data to stack s

S: 3 10

Continue to follow this rule until stack d is empty, and s will eventually have only one number, that is, the answer


3. There is a set of numbers, and the average weights required by the Heman encoding are given to be the minimum.

Example: 3 7 9 1 12

Build a Heman tree based on its size


Iv. Virtual inheritance in c ++

1. Role of virtual inheritance

The ambiguity of Multi-Inheritance

2. Knowledge about the virtual base class

V. Singleton Mode

6. Enable a class instance to allocate memory only in the heap but not in the stack.

Class {};

A a = new A allocates memory in the heap.

A B is to allocate memory in the stack to call its default constructor.

So you can declare the default constructor as private.






Who has been interviewed for a perfect world hr?

Answer 1: you can find it! That's it!
Answer 2: deliberately make it difficult for you to see if you can suffer more!
Answer 3: Look at you with an excuse!
Answer 4: You are a type that she does not like... We recommend that you withdraw the account ..
 
Helping the perfect world ~~~~~

If you haven't received an interview call for such a long period of time, it should be because your resume screening is unqualified. Now, when you screen your resume, as long as you are not particularly short of people, you may just take a look. Therefore, we suggest you
First, you need to make your resume very eye-catching, so that you can carefully check your resume screening staff.
Second, experience is very important. The current company does not have a special requirement on academic qualifications. It mainly depends on your experience. If you just graduated, I suggest you find an internship, change jobs with experience
The perfect game tester is a QA job and has high experience requirements. However, if you really need this job, you can find the perfect employee and use the internal recommendation channel, in this way, it is more likely to receive an interview call.
Hope to help you!

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.