An algorithm week, an English review technical articles, learning a technical skill, a technical point of view and share ideas
Algorithm
Title: two numbers and
Given an array of integers, index returns these two figures, so that they add up to a specified number.
Because the index is the return of two numbers, so you can not sort the array. Even if the sort should retain the original index.
Ideas 1
Two-cycle
1 |
class { |
beats 26.64%
Ideas 2
Use HashMap
, space for time
1 |
class { |
beats 99.70%
Review
The Key To Accelerating Your Coding Skills
In the process of learning to program, starting from a point in time will feel "epiphany", this time called the inflection point.
The first is the tutorial phase (3-8 weeks rigorous coding), at this stage should pay attention to detail, summarize learning from the error message. Recognizing the programming can not be done overnight, is the need for long-term continuous learning.
Second phase inflection point (right frame of mind of 2-4 weeks), you will find that at this stage of the coding efficiency is improved by 10 to 20 times. However, do not meet, always left empty cup mentality, stick a little progress every day. Emphasis on basic learning algorithms and data structures.
Finally, the turning point, no longer blind pursuit of new technology that can see through the nature of the new technology. Able to learn new techniques based on knowledge has been learned. Accumulate its own code base.
How to tell if passed the inflection point? In fact, it is to change the mentality. Accept the software development is an ongoing process of learning. Continuous learning is accepted in order to solve more complex problems.
Tip
Share a comment Boot week of Spring @Profile
, what use is it?
It can mark any @Component
, @Configuration
and @Bean
on to decide whether to load the current environment.
For example, used in the project to Swagger, only we want to use in development and test environments.
1 |
2 |
When spring.profiles.active=dev,test
time, Swagger can be accessed.
Non-generated environment can also be written as @Profile("!prod")
Note: The @Bean
use of the method @Profile
when there may be a special case: For a Java method overload the same name of @Bean
the method (similar to the overloaded constructor) must consistently declared on all overloaded methods @Profile
conditions.
Share
Recently the company recruit Java developers, resume screening by me, to talk about my personal point of view from the perspective of technical personnel more interview opportunities resume is what.
- A complete resume. Including at least personal information, work experience, project experience, skills
- Complete project experience. Including project profiles, architecture, use of technology, responsibility, achievement, harvest. If you can show it better.
- skill. It will demonstrate the technology
bonus:
- Entry through manufacturers
- personal blog
- Github
Precautions:
- Resume should be true
- Resume writing information not insignificant, focus.
- To read your resume, imagine you are a recruiter, access to what information from your resume.