How to get half of the interview company offer--my Python career path (turn)

Source: Internet
Author: User

Original source: http://www.cnblogs.com/Lands-ljk/p/5836492.html

Starting from the end of August to find a job, a short week more, interviewed 9 companies, to get 5 offer, probably because I interviewed the company are some entrepreneurial companies, but still feel a lot, because the time to learn Python is very short, did not expect to find a relatively easy job, I would like to share with you the interview experience of these days and hope to provide some help to the small partners who learn python to find a job.

I feel the interview the most important two points: 1. Project experience. 2. The project experience and the recruitment position match, this is the most important, others are icing on the cake.

Self introduction

This is a send the problem, the first question of the constant. However, some small partners may not care too much, in fact, this problem has been in the interviewer's heart to determine your intention to stay. The main structure of self-introduction: Personal basic information + BASIC technical composition + project experience (specific project and responsible part of the project) + self-evaluation, the principle is to closely around the recruitment of the needs of the job to do. Before doing so, be prepared to look at what the recruiter specifically needs in the direction of the development engineer. At present, for Python, the recruitment of the hook on the Automation test platform for the design and development, data mining and cleaning. Simple Web development does not seem to have, so the web direction of the students attention, more and the operation and automation aspects of the closer.

Two-segment Enquiry

During the interview process, when the interviewer raises a question, it tends to give a deeper problem to the problem itself. For example: Have you ever used a with statement? My answer is that the WITH statement is often used for access to resources, ensuring that during access, regardless of whether an exception occurs, the necessary cleanup operations are performed, such as the automatic closing of files and the automatic acquisition and release of locks in threads. The interviewer then asked, you know why with the statement can make the file properly closed, suddenly I asked stuffy, can only vaguely remember with the statement will open up a separate environment to perform file access, similar to the sandbox mechanism. The interviewer was reluctant to pass the answer. So know it more to know why. In peacetime study, ask one more why, interview time will not be too passive.

Don't dig yourself a hole.

Make sure you answer the interviewer in the process, every knowledge point in the answer is clear to the chest, or be asked to live, is very embarrassing. When I answered the web security question, flung said SQL injection, and the interviewer said that since the SQL injection was mentioned, you should talk about its principles and solutions. It was embarrassing that I had mixed up the XSS cross-site injection attack and SQL injection, and the scene was a little awkward. So think of every word you say, smart students can also guide the interviewer, let him ask the question he wants to be asked.

Must ask Redis, high concurrency solution

Interviewing a lot of companies, must ask Redis know how much, high concurrency solution. The author's answer is not very good.

What new skills have you learned this year?

This is where the interviewer is looking to see if you are passionate about fresh technology. Interview my interviewer has asked this question without exception. They all want to find a young man who keeps learning and innovating. Browse the latest technical information and choose your area of interest.

Would you choose a startup company or a big company like Bat, why?

Of course, it depends on which company the recruiter belongs to, and it is generally a start-up company that does not ask questions. The answer is: Challenge big, enjoy the challenge, the venture company has the possibility of infinite success, want to grow together with the company;

Why did you leave from the last company?

This is also a must ask questions, find a more legitimate reason, do not say what the company snacks too much fat 20 pounds, the company week near the takeout are tired of eating, really don't say so ... The main principle is not to complain about the former company, boss Flop, PM not reliable what, more to find their own reasons: the company's development is relatively stable, but I am still young, I hope there are more challenges and more learning opportunities. Like this, you can.

Describe your last company.

This question asked the odds are not too big, but also has three companies asked, recruiters mainly want to from the previous company's specific business size and main business to locate your level, know the purpose of the recruiter can calmly answer.

Technical issues

The non-technical problem is that many of the above, as a reference to a little preparation, the interview can be fluent. Let's talk about the technical issues in the interview. The personal feeling technical question the interviewer asks not particularly many, generally inspects 2-3, from shallow to deep.

  1. Brief introduction to Functional programming

    In functional programming, a function is a basic unit, and a variable is simply a name, not a storage unit. In addition to anonymous functions, Python uses fliter (), map (), reduce (), and apply () functions to support functional programming.

  2. What are anonymous functions and what are the limitations of anonymous functions?

    Anonymous functions, or lambda functions, are often used in functions that are relatively simple in function bodies. The anonymous function, by definition, is a function without a name, so don't worry about function name collisions. However, Python's support for anonymous functions is limited, and anonymous functions can be used only in some simple cases.

  3. How to catch exceptions, what are the common exception mechanisms?

    If we do not prevent any exceptions, then an exception occurs during the execution of the program, it interrupts the program, invokes the Python default exception handler, and outputs the exception information at the terminal.

    Try...except...finally statement: An exception occurs when the Try statement executes, back to the Try statement layer, looking for a except statement later. When the except statement is found, this custom exception handler is called. Except after the exception is processed, the program continues to execute down. The finally statement indicates that the statements in finally are executed regardless of whether the exception occurred.

    Assert statement: Determines whether the statement immediately following the assert is true or false, if true, continues print, if False, interrupts the program, invokes the default exception handler, and outputs a hint after the Assert statement comma.

    With statement: If an exception occurs in the WITH statement or statement block, the default exception handler is invoked, but the file is closed gracefully.

  4. The difference between copy () and Deepcopy ()

    Copy is a shallow copy that copies only the parent elements of a mutable object. Deepcopy is a deep copy that recursively copies all the elements of a mutable object.

  5. What does a function adorner do (frequent test)

    An adorner is essentially a Python function that allows other functions to add extra functionality without any code changes, and the return value of the adorner is also a function object. It is often used in scenarios where there is a need for facets, such as inserting logs, performance testing, transaction processing, caching, permission checking, and so on. With adorners, you can pull out a lot of similar code that is not related to the function itself and continue to reuse it.

  6. Briefly describe the scope of Python and the order of Python search variables

    The python scope is simply a namespace for a variable. The position in the code where the variable is assigned determines which scope of the object can access the variable, which is the scope of the variable. In Python, only modules (module), class, and functions (Def, Lambda) introduce new scopes. Python's variable name resolution mechanism is also known as the LEGB rule: local scope (native) → current scope embedded local scope (enclosing locals) → Global/module scope (global) → Built-in scope (built-in)

  7. The difference between a new class and a legacy class, how to ensure that the class used is a modern class

    In order to unify classes (class) and types (type), Python introduced a new class in version 2.2. In version 2.1, classes and types are different.

    To ensure that you are using a modern class, you have the following methods:

    Placed at the front of the class module code __metaclass__ = Type is inherited directly or indirectly from the built-in class object in the Python3 version, all classes by default are modern.

  8. Brief description of the difference between __new__ and __init__

    When you create a new instance, call __new__, and initialize an instance with __init__, which is their most essential difference.

    The new method returns the constructed object, and Init does not.

    The new function must have a CLS as the first argument, and Init takes self as its first argument.

  9. Python garbage collection mechanism (common test)

    Python GC uses reference counts (reference counting) primarily to track and recycle garbage. On the basis of reference counting, through "mark-clear" (Mark and sweep) to solve the problem that the container object may produce circular reference, through "generational recovery" (generation collection) to improve garbage collection efficiency by means of space-time-changing.

    1 Reference count

    Pyobject are the necessary content for each object, where ob_refcnt is counted as a reference. When an object has a new reference, its ob_refcnt is incremented, and when the object referencing it is deleted, its ob_refcnt is reduced. The object's life ends when the reference count is 0 o'clock.

    Advantages:

    Simple real-time disadvantage:

    Maintain reference count consumption resource circular reference

    2 Mark-Clear mechanism

    The basic idea is to allocate on demand, wait until there is no free memory from the register and the reference on the stack to start, traverse the object as a node, the reference as the edge of the graph, all the objects can be accessed to mark, and then sweep the memory space, all unmarked objects released.

    3 Generational Technology

    The whole idea of generational recycling is that all memory blocks in the system are divided into different sets according to their survival time, each set becomes a "generation", and the garbage collection frequency decreases with the increase of the survival time of "generation", and the survival time is usually measured by several garbage collection.

    Python By default defines a collection of three generations of objects, the larger the number of indexes, the longer the object survives.

  10. What is the role of @property in Python? How do I implement a read-only property of a member variable?

    @property Decorator is responsible for turning a method into a property call, usually used in the property's Get method and set method, by setting @property can realize the direct access of the instance member variables, but also preserves the parameters of the check. In addition, you can implement a read-only property of a member variable by setting the Get method without defining a set method.

  11. *args and **kwargs

    *args represents the positional parameter, which receives any number of parameters and passes them as tuples to the function. The **kwargs represents a keyword parameter that allows you to use a parameter name that is not defined beforehand, and the positional parameter must precede the keyword argument.

  12. Have you ever worked with statement? What are the benefits of it? How is it implemented?

    The WITH statement is useful for accessing resources, ensuring that the necessary "cleanup" operations are performed regardless of whether an exception occurs during use, freeing up resources such as automatic shutdown after file use, automatic acquisition and release of locks in threads, and so on.

  13. What would be is the output of the code below? Explain your answer

    DefExtend_list(Val, list=[]): List.append (Val)return listlist1 = Extend_list (List2 = Extend_list (123, []) List3 = Extend_list (' A ') print (List1)# list1 = [Ten, ' A ']print (LIST2)# list2 = [123, []]print (LIST3)# list3 = [Ten, ' a ']class parent1< Span class= "Hljs-keyword" >class child1 (Parent): passclass Child2< Span class= "Hljs-params" > (Parent): passprint (Parent.x, child1.x, child2.x) # [1,1,1]child1.x = 2print (Parent.x, child1.x, child2.x) # [1,2,1]partent.x = 3print (Parent.x, child1.x, child2.x) # [3,2,3]             
  14. In a two-dimensional array, each row is ordered in ascending order from left to right, and each column is sorted in ascending order from top to bottom. Complete a function, enter a two-dimensional array and an integer to determine if the array contains the integer.

    arr = [[1,4,7,10,15], [2,5,8,12,19], [3,6,9,16,22], [10,13,14,17,24], [18,21st23,26,30]]def getnum (num,Data=None): WhileDataIf num >Data[0][-1]: DelData[0] Print (DATA) Getnum (NUM,Data=None) Elif Num <data[0][-1]:  data = List (zip (*data)) del data[-1] data = List (zip (*data)) print (data) getnum (num, data= none) else:return true  data.clear () return falseif __name__ = = ' __main__ ': Print (Getnum (18, arr))         
  15. Get the maximum number of conventions, least common multiple

     a = 36b = 21def maxcommon (A, B): while b:a,b = B, a%b Span class= "Hljs-keyword" >return adef mincommon (A, b): c = a*b while b:a,b = b , a%b return c//aif __name__ =  __ Main__ ': Print (Maxcommon (b)) print (Mincommon (b))         
  16. Gets the median number

    def median(data):    data.sort()    half = len(data) // 2 return (data[half] + data[~half])/2l = [1,3,4,53,2,46,8,42,82]if __name__ == ‘__main__‘: print(median(l))
  17. Enter an integer that outputs the number of 1 in the binary representation. Where negative numbers are expressed in complement.

    def getonecount  (num): if num > 0:count = b_ Num.count ( ' 1 ') print (b_num) return count elif num < 0:b_num = Bin (~num) count = 8-b_num.count ( ' 1 ') return count else: return 8 if __name__ =  ' __main__ ': Print (Getonecount (5)" Print (Getonecount (-5)) print (Getonecount (0) ) 

The above is the question I was asked during the interview process, the algorithm is relatively small, and only 2 companies require writing algorithms, the data structure seems to be asked is not particularly much, asked a B + tree structure. The database asks about index-related optimizations. A little bit of basic can be answered, but the best can be discussed in depth.

This article only to make a point of use, some of the ideas are not particularly mature, hoping to learn python to find work partners to provide some help, the most important point in the interview process is the level of attitude, the job search process is both sides, do not need too much tension, the knowledge of their own fully expressed good. As long as you are a horse, sooner or later will be the Bole led out for a walk.

Reprint please specify the source ~

How to get half of the interview company offer--my Python career path (turn)

Related Article

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.