GeekBand-geek class-C ++ algorithm principles and practices-dong Fei-Course Notes (1), geekband-dong Fei
GeekBand-geek class-C ++ algorithm principles and practices-dong Fei-Course Notes (I) Introduction to algorithms and programming styles
/*StrStrReturns the position of the first occurrence of string get in string source, or -1 if target is not part not of source.*/
Another blog: http://blog.csdn.net/lionpku/article/details/46713877
StrStr FAQ 1
The problem is KMP.
StrStr FAQ 2
Poor programming habits and code style
StrStr FAQ 3
Array out-of-bounds
StrStr FAQ 4
for( i=0; i<source.length() - target.length(); i++ )
Length (): algorithm complexity O (1)
for( i = 0; i < strlen(source) - strlen(target); i++ )
Strlen (): algorithm complexity O (n)
Common Mistakes in interviews
- The questions (or simple questions) You have done will certainly survive.
- When the algorithm comes up
- The code can be written.
Job seekers in the interviewer's eyes
- You may be his future colleague
- Does your code look comfortable?
- How long does TA need to Review your code?
- Is your Coding habit good?
- TA will not help you DEBUG in the future, and you will not often encounter accidents.
- Is your communication skills good?
- Is it hard for TA to communicate with you?
Basic programming skills for interviews
- Program style (indent, Parentheses, variable name)
- Coding habits (exception check and boundary processing)
- Communication (enable the interviewer to understand your intentions at all times)
- Test (take the initiative to write a reasonable Testcase)
Are you sure you want to interview?
- Did you write it on white paper before you do it?
- I wrote more than 200 questions? How many questions have you had?
- Won't the question be said directly?
- Do you think the interviewer is bothering you?
How to practice algorithm always hurts
- I did a lot of questions, but I couldn't remember the solution.
- I have never figured out what dynamic planning is like.
- I have met this question, but I still don't know how to do it.
- Leetcode and cc150 have all been refreshed.
Supplement common websites:
Google: http://www.google.com
Collabedit: http://collabedit.com
Google Style Guide: https://github.com/google/styleguide
Google open source project Style Guide-Chinese project: https://github.com/zh-google-styleguide/zh-google-styleguide
Leetcode: https://leetcode.com
CareerCup: http://www.careercup.com/
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.