20182330 "programming and design structure," the seventh week learning summary

20182330 "programming and design structure," the seventh week learning summary

Learning content summary

Monday: Android four components

  1. Activity (sighted energy activities)
  2. Service (invisible some operations, support for the process.)
  3. content provider (Student ID to pass information)
  4. broadcast receiver

Wednesday: Data Structure: computer store, organize data the way

Software Development

  1. Software Quality features: reliable reuse efficiency
    is not a solution that can solve all the problems
  2. Program = data structure + algorithm
    software program = + Software Engineering
  3. Algorithm efficiency: The use of CPU time representation of
    algorithm analysis algorithm to classify in terms of efficiency
    growth function
  4. The time complexity is O (n ^ 2) (big o notation), which take the large, ignore the small
    n * o (1) = o (n). How many times executed. See multilayer cycle square
    calculation rules: Guidelines addition, the block parallel
    multiplication guidelines nested block
    special criteria, their definition

Friday: Stack: last out. Top of the stack, stack bottom

  1. Stack operations:
    push (push) push, the stack (popped) pop, peek (taking the top element), empty (stack is empty)
  2. Generic (what types of elements put) template, and what types can be
    class box
  3. 使用:Stack stack=new Stack();
    stach.push(name); System.out.println(stack);
  4. peek top with an array :( implemented stack)
    top (pointer-like) element into a position of 0, top to 1 (see the stack there are several subtle elements), top-to delete a preceding value
    peek view the top of the stack
  5. Prefix postfix infix expression (according to operator position)
    EG: 1 + 1 infix
    postfix notation, also called reverse Polish notation
    achieve postfix expression using a stack: meet a number, put him on the stack, in the face of a when the operator, the operator acts on the two numbers popped from the stack, the result placed in the stack

Textbook learning and problem-solving process

  • Question 1: Why did not the endless array with an array achieve list, what is the difference when queue as an array?
  • Problem 1 Solution: For non-circular array of arrays queue assumes that the first element of the queue is always stored in the index 0 array, due to the queue processing affects both ends of the set, so when you delete an element, the policy requires that the mobile elements, dequeue operation of such complexity is O (n), such that the array is selected to achieve low operating efficiency, the array seen annular element needs to be removed in the displacement of the array queue.
  • For lists implemented using an array, may be added to the general list and deleting from both ends of the elements, but they have to insert or remove elements from the middle of the list, to move the element can not be avoided, an annular array of methods may be used, but when the list intermediate insert or delete elements still need to move elements, so it is using the circular array is not necessary

  • Question 2: What is the stack, heap and stack in the end is not a concept
  • Problem 2 Solution: Stack, in fact stack. In the computer field, the stack is a concept can not be ignored, the stack is a data structure. Data structure of a data item that is stacked in sequence, only one end (referred to as a top of the stack (Top)) to insert and delete data items
  • Heap is a special tree data structure in computer science. If it satisfies the following properties, the stack can be called: "Given an arbitrary node stack P and C, if C P is the parent node, then the value of P will be less (or greater than or equal) value C." If the value of the constant is smaller than the parent node is equal to a child node, this is called the minimum heap stack; the other hand, if the value of the parent node is equal to the value in the rival child node, this is called the maximum heap stack. In that a stack top node, called the root node does not have a parent node
  • Heap and stack difference java in
    the java typically used to store the stack and the array of objects, a method for storing stacks and general basic types (Note: do not include the basic types string) variable.
    Stack access speed faster than the reactor. Stack data can be shared (Explanation: such int a = 3; int b = 3; b case directly to the address pointer to 3, do not re-open an address space of the memory 3)

  • Question 3: The difference queues, linked lists and stack three
  • Problems Solution 3: stack and queue data structure is a linear chain of two similar, but more limited in use. For a general list, any position may be performed by inserting and removing nodes to modify the list, but can join node queue (enqueued) (stack) at one end, a node at the other end (dequeue) (pop), Thus queues are FIFO (FIFO) data structure, the stack is a last in first out (LIFO) data structure.

  • Question 4: For the queue, we're working at both ends, and the order is not insignificant, and therefore, fixed arrays to implement a stack efficiency is not high, because the order of the queue so it is important to realize stack efficiency high?
  • Question 4 Solution: Contrast mentioned before a fixed array stack implementation strategy is effective, and get access to information on the Internet, should be "fixed arrays to achieve efficiency queue is not high."

Code debugging and problem solving in the process

  • Question 1: a list of practical completion of the cycle, has been an error
  • Problem 1 Solution: Close inspection showed that the original isEmpty method is wrong, the original cause has been thrown return0 error code after the change are as follows:

  • Question 2: Code and Double Cheese Li git does not go up
  • Problem 2 Solution:
    Find and debugging for a long time and found that this is a problem that comes with the computer program, due to the computer's Xcode upgrade, causing the computer does not recognize pirated idea downloaded from the website position, reconnect just fine

Code hosting

(Run results screenshot statistics.sh script)

Last week exam wrong question summary

Last week, no exams

Pair peer review and

Comments had students blog and code

  • Pair this week learning
    • 20182314
    • Comments: Because the data structure focuses on understanding types, so knowledge can be a little more detail, in simple language, reflect their own understanding.
      Based on score, I give this blog scoring: 13 points. Score as follows:
      exquisite typography, add 1 point
      twinning learning authentic 1 point for
      correct use Markdown syntax
      complete elements of the template (1 point)
      wrong topic to learn in-depth plus 1 point
      review seriously, I can point out the blog and code plus 1 point in the issue of
      problem solving and teaching learning process, plus 5 points
      problems in code debugging and settlement, plus 2 points
  • Last week blog peer assessment case

Other (perception, thinking, etc., optional)

Enter data structure learning time to time even the experimental class tensions have been used to constantly instill knowledge, so just understand the lesson is not enough, be sure to review after class and a lot of practice!

Learning progress bar

The number of lines of code (add / accumulate) Blog amount (add / accumulate) Learning time (add / accumulate) Important growth
aims 5000 rows 30 400 hours
the first week 42/42 2/2 20/20
The third week 394/471 2/4 25/45
the fourth week 394/471 2/4 25/45
fifth week 1668/2139 2/6 35/80
Sixth Week 2388/4527 1/7 30/110
Week Seven 1/8 25/135
  • Plan study time: 20 hours

  • The actual study time: 25 hours

  • To improve the situation: I hope a lot of practice

Reference material

Guess you like

Origin www.cnblogs.com/weiii/p/11787834.html