The first eight weeks learning summary

20,182,319 2019-2020-1 "data structures and object-oriented programming," the first eight weeks of learning summary

Learning content summary

This week, we learn that chapter 14, the main learned knowledge about finding and sorting of.

  • First, we learned that knowledge to find, in that which we learned sequential search, binary search, hash lookup (ie hash lookup, learned a linear probe method and the chain address law) for sequential search, it is a relatively simple algorithm is also more violent, its simplicity is its code is relatively simple to achieve, is to get two for loops, and its condition is very simple, ah ~ really very simple, so simple that no conditions (I suspect you doing things). However, simple is not necessarily the best, most simple thing to achieve it is also more violent, so that there is a program feature that is slow, so we can mention me in our binary search the a feature of this algorithm is that it is very fast compared to the linear search is O (n), its complexity is O (logn) the advantage is that we can be active in a lot of time running, such as a number of achieve data 1000, we are one O (1000) one (10) with the difference O Obviously, if an algorithm is much faster than the algorithm ordinary violence, then it certainly is a skill, and with skills in general what conditions will require some sacrifice or some other instance in space, we also have a binary search restriction is that it must be the original series has a sorted queue, otherwise it will not be achieved. Finally, a hash lookup is our law, and this is a very interesting discovery methods, it is also a way to limit, but with the binary difference is that it is not the original number of columns What are the requirements, but the beginning of a program running certain requirements, which requires program starts when it should be used with its own matching array input, or when in use then the target array into the array to go before it can work, and for its complexity is a relatively fan thing, because its complexity is not a fixed, but is from 1 to n uncertain, of course, it is that depending on your hash function, different definitions for this function, we can put it down to very low complexity, of course, that time may have high demands on the complexity of the space.
  • Then, the sort of learning is the main way we insertion sort, selection sort, bubble sort, quick sort and merge sort (that is, we usually say barrel row), there is also mentioned shell sort, but a little thing that advanced, and usually use words or may not put to good use. So they pass it over. Then see insert, select, and bubbling, which is the basis for comparison of the three sorting, actually slower way, then we can consider to be quick sort and merge sort, sort of these two relatively fast, to less so in theory. Of course, they may be difficult to implement, we generally recursive way, so you can still work in a number of activities.

Textbook learning and problem-solving process

  • Question 1: choice is not a stable sort algorithm?
  • Problem 1 Solution: For this issue, I think actually experienced a transformation, originally, I thought the so-called stability, that is, a program to run to the final results as long as the same number of relatively constant enough context, however, their lessons made me feel myself very naive, in fact, can only change the relative context, have not occurred in the whole process is called a stable, so I firmly knees. The answer is: not

Code debugging and problem solving in the process

  • Question 1: merge sort in theory these should be considered the king, because of its complexity are particularly low from which side, at least not slow to fast. But in fact it is less so than others computation still an order of magnitude slower than others, which is a little embarrassing.

Here Insert Picture Description

Here Insert Picture Description

  • Solution: This is obviously beyond the scope of my abilities, I have no alternative but to go to help students and teachers, in fact, found that most of the students also have this problem, I am not a case, which is very research value, and then ask the teacher a little, I began to think that the data is too small, then open from 1000 to 10,000 or so found, so he opened 100,000 still no use, but did not continue to try, because the predicted time to open 1000000 is 10000s that is three hours, this is just a small sort of a program may have to be down 5 daysI am tired smileThere is no way to try and answer the teacher gives is possible because of the different methods used by different programs, I might happen with a slow or issue its own procedure.

Code hosting

Here Insert Picture Description

Pair peer review and

Score: 10

Evaluation

  • Or issues worth learning blog:
    I think this time he's still not enough to solve the problem in detail and, after some people look confused, you can try to stick a little picture, so that people see the issue more clearly, but there are done nice place, his study plan written more perfect, but he can do better learning content for feed, more suitable for the average person to review time to look, you can glance over their own learning something and then forget what areas might be catch up on

Comments had students blog and code

  • Pair this week learning
    • [20182325]

Learning progress bar

The number of lines of code (add / accumulate) Blog amount (add / accumulate) Learning time (add / accumulate)
aims 5000 rows 30 400 hours
the first week 62/62 1/1 30/30
the second week 188/250 4/5 17/47
The third week 619/869 1/6 18/65
the fourth week 386/386 2/8 20/82
fifth week 909/1295 0/8 18/100
Sixth Week 1470/2765 1/9 25/125
Seventh, eight weeks 1810/4575 3/12 33/158

Guess you like

Origin www.cnblogs.com/ydfy/p/11793969.html