Chapter 16 The Temptation of New Technology
Yang Chen opened the link with great interest.
Jump out of a registration verification.
Yang Chen entered his mobile phone number, and then, through his WeChat account, he logged in.
Enter the first challenge level, an algorithm problem.
After reading the title, Yang Chen couldn't help but become interested.
Find the length of the longest non-repeating substring in a string, this is a problem about the algorithm of big data.
It's a bit difficult, but it can't be difficult for Yang Chen.
There are two solutions to this problem, the easiest way is to brute force, and the other is to cleverly use pointers to solve.
The brute force method is simple and rude, but the efficiency is too low. All possible results are listed by the exhaustive method, and then the qualified solutions are further screened according to the additional conditions.
Yang Chen doesn't plan to use it, but uses the pointer method to solve it, which is more efficient, but requires a deep understanding of pointers.
Use three integers maxLength, start, end to store the maximum substring length, substring start position, substring end, . . .
Yang Chen called out the programming tool and tapped the code one after another.
Soon, Yang Chen pasted the answer code of the question in the answer box below the level, and clicked send.
It didn't take long for the checkpoint to verify the answer and give it a pass.
The title of the second level jumps out: a binary tree, sum of paths
After reading the question, Yang Chen frowned. This is an algorithm question for the client. After thinking about it, he still has an idea to solve this question.
The third question, the fourth question, ..., Yang Chen passed all the way.
Until the tenth level, Yang Chen was stumped by the question, struggling to think of a way to solve the problem.
There is a large list of integers, and we need to find the sum of all the integers in this list. How to implement multi-core calculation and calculate an accurate result.
This kind of algorithm is not in Yang Chen's grasp. Yang Chen's only idea is to use multiple threads (tasks), and also to divide the List, and each small piece of List uses a thread (task) to calculate the sum.
Then you have to wait for all threads (tasks) to complete before you can get the correct result, but how can you ensure that "all the threads (tasks) output the output after the completion of the result at the same time?
...
Yang Chen frowned, he couldn't think of the way to dismantle this topic for a long time.
However, Yang Chen saw a level assistant at the bottom of the level, click on that link to get a guide to get through this level.
For a long time, he couldn't find the answer to disintegration. Yang Chen had no choice but to admit defeat to this system, and click on the link to find a strategy for breaking through the barrier.
The link opens and jumps directly to a page showing a theoretical page of a multi-core algorithm.
Yang Chen was stunned for a moment, and carefully read the demonstration content of this multi-core algorithm. Soon, his mind became addicted, and a new algorithm logic continued to appear in his mind.
After applying this multi-core algorithm based on the disintegration idea of the level title, Yang Chen quickly found the correct way to break through the level.
Yang Chen was inexplicably excited, and quickly followed the operation logic of the multi-core algorithm, and it didn't take long for him to write the standard answer to the question.
Click-Send.
If the answer is correct, clear the tenth level and continue to the next level.
The content of the eleventh question is presented.
Yang Chen carefully read the topic, and after a while, his face suddenly became ugly, and he fell into self-doubt.
This is a problem that Yang Chen can't solve. It seems that a new algorithm similar to the multi-core algorithm needs to be applied.
Yang Chen hurriedly clicked on the lower right corner to get theoretical support for customs clearance.
However, this time, the clearance system pops up a prompt dialog box.
Insufficient points to pass the level, unable to obtain theoretical support.
Yang Chen looked at the rules, and it took a series of ten levels to get a theoretical support.
In addition, the pass-through system also provides two methods for obtaining theoretical support times, one, assisting in writing programming requirements, and two, assisting in approval procedures.
Yang Chen was intrigued, and quickly clicked to assist in writing programming requirements.
The next moment, the content of a dozen functional requirements is displayed.
Three-dimensional proofreading simulation display, virtual point judgment, implementation of parabolic line marking, ..., there are many, dozens of similar difficulties, and the specific programming requirements of functions are presented in front of Yang Chen.
Yang Chen frowned, and casually opened a demand content titled 3D Proofreading Simulation Display to check it out.
Soon, a strange feeling emerged in Yang Chen's heart. This demand was very specific and precise.
It was so accurate that Yang Chen could write it all out at a glance. However, it would take a while to write this program. Yang Chen estimated that it would take about three to four days for his work efficiency to take it down.
Oh shit! Isn't this taking advantage of your own free labor?
Can't fall for this shit.
Yang Chen suddenly realized the real purpose of this customs clearance system.
Yang Chen is in an IT company and holds the post of chief engineer. It is the golden age of 30 years old. With a low salary of 50,000 yuan, plus project bonuses, the monthly salary is a minimum of 100,000 yuan. The actual effect of three or four days of work is worth about 10,000 yuan. .
However, the developers of this checkpoint system had them sign a liability waiver in advance when registering.
That is to say, if you help write these functional requirements for free, then the system designer can use the code he created for free.
Oh shit! To whitewash the fruits of his labor.
Who developed this pass-through system is too shrewd.
I don't play anymore!
Thinking of this, Yang Chen angrily threw out the phone, resentful.
However, not long after he lost the mouse, Yang Chen was staring at the question of the eleventh level, his heart was itching.
I am very curious about what algorithm hints can solve this algorithm problem.
The multi-core algorithm he learned before was very helpful to him, and he can use it in many programs in the future.
If it is a new algorithm.
It's a pity to miss it so in vain?
Is there any other way to get technical support once.
Yang Chen thought for a while, and clicked on another function to obtain theoretical support: assisting the approval process.
Assisting the approval process to open, is to assist in writing the content of programming requirements, but it is not writing, but assisting in approving the content of those function writers.
Currently, the content is empty, but there is an approval leaderboard.
Yang Chen thought about it for a while, and then he understood the purpose of this function, and he was trying to buy other challenger labor for free.
The designer who developed this system is very cunning, and I don't like it.
Yang Chen turned off the computer in a rage and turned off the computer.
However, it didn't take long for Yang Chen to throw away the phone again, and sat down at the computer desk helplessly.
It's too uncomfortable, that algorithm problem has been entangled in Yang Chen's mind.
Feeling the beauty of multi-core algorithms, facing the attraction of new algorithm logic, no one who studies new technologies attentively can afford this temptation.
Yang Chen, who was eager to learn new algorithms, impatiently opened the level challenge system.