People who learn programming can't help but see good articles. Experience skills

  

As a senior student, I have interviewed a lot of units, and there are successes and failures, but for me all failures are in a certain In a sense, it is a kind of success, especially the ones I wrote below. At the time of writing this article, I have signed a software company in Nanjing, but I remember the experience of interviewing 99v company in Suzhou and Taiwan on February 21 this year. I am really deeply touched by the fact that we are now learning programming. This interview made me deeply understand the failure but also gained a lot. What I want to say will be divided into three parts,

1. It is the specific experience of my interview. 2. It is thought of by the interview 3. I should do it now. Of course, these words are largely my personal opinions. I can't get everyone's approval. So in some opinions, if any friend feels that there is a big difference with me, please don't mind, don't attack me. Just when I didn't say it, welcome to contact me to discuss these issues! My EMAIL: [email protected]

1. After the interview, I received an interview notice from Taiwan Ruiqi Suzhou Company about 2 years ago, and informed me that I will go to the Suzhou Industrial Park for an interview on February 21 and receive an interview. In the next few days, I have reviewed some professional courses, especially, and because of the college years, I have been specializing in these aspects, and through the examination of senior programmers, I have almost reached the familiar algorithm. At the point of the chest, the feeling at the time was that if I asked me these questions, I should have no problem! On the 21st, I was scheduled to be interviewed at 4:30, and a technician gave me a separate interview and asked some questions. After the simple question, he gave me a programming topic. The title is this: 1) Write a function to calculate the value 1-2+3-4+5-6+7 when the parameter is n... +n哼, my heart sneered! I didn't expect it to be so simple, I was a little nervous and relaxed! So soon I gave my solution: longfnforreturntemp;} get it! When I looked at the interviewer with the look of anticipation, he smiled and told me that the result of the implementation is definitely no problem! But when n is very large, my program execution efficiency is very low. In the development, the running efficiency of the program is very important. It is good to make one instruction less. He let me see what else can be modified in this program. The place to optimize the program! After listening to these words, my mood changed a bit heavy at the time. I didn't expect his requirements to be very strict. After that, I conducted a rigorous analysis of the program and gave an improved plan! Longfnwhilereturntemp;} Although I can't guarantee that my algorithm is optimal, compared to the previous program, I changed all the statements related to the multiplication instructions to the execution instructions, which not only met the requirements of the problem but also shortened the operation time. a lot of! The price is simply to add an integer variable! However, my current confidence has been hit a little bit. I will be the suspected interviewer. He still smiled and said to me: "Yes, this program does have a great improvement in efficiency!" I am so happy in my heart! But he went on to say that this program still can't meet his requirements, and I want to give a better solution! God! There is optimization! I really collapsed at the time. After thinking about it for a while, I asked him to give his plan! Then he gave his program very refreshingly! Longfnifreturn;elsereturn+n;} Funny, I was dumbfounded at the time, I didn't expect him to mean this, I really can't write such a simple code, but why didn't I think about it? He said nothing wrong. When n is very big, the difference in running time between the three programs is a world of difference! When I just wanted to say something, he spoke first: "Don't think that the CPU is fast and push all the problems to it. The programmer should optimize the code and optimize it. We can do it ourselves. Never let the CPU do it, because the CPU is for the user, not for our programmers! What a brilliant language, I don't want to say anything any more! Then there is the second question: 2), he asked me to use a tricky programming method to implement the function of two functions with a function such as: fn1=n/2!+n/3!+n/4 !+n/5!+n/6!fn2=n/5!+n/6!+n/7!+n/8!+n/9! Now implement with a function fn, when flag is 0, Implement the fn1 function, if the flag is 1, implement the fn2 function! His requirements are efficiency, efficiency and efficiency! To be honest, if I am in a good mood, I should be able to give a better algorithm, but I really didn't have any thoughts at the time. I doodled some formulas such as 6!=65! on paper. After straightforward, he told him to ask him to give his answer! The interviewer did not say anything, given his idea: define a two-dimensional array of floatat stored in [2!, 3!, 4!, 5!, 6!}, and finally get the calculated value! Oh, the typical space for time algorithm! It took a total of 50 minutes. In ten minutes, I chatted with him casually and talked about some programming and life problems. At that time, I was very relaxed because I knew that there was only one interview result. :failure. At 5:30, the interviewer asked me to wait for the notice, so I left their company. This is the whole process of the interview! ;

Copyright © Windows knowledge All Rights Reserved