20172327 2018-2019-1 "program design and data structure" Fourth week study summary textbook study contents summary sixth chapter list
1. Linked lists and list comparisons: Linked lists are an implementation strategy that uses references to create links between objects. A list collection is a conceptual representation that lists can be implemented by linked lists and arrays.
2. Stacks and queues are linear structures whose elements can only be added and deleted at the end. The list collection is more generalized, and elements can be added and removed at the middle and end of the list.
3. The list of collections is divided into 3 types:
Sequence list (ordered list): its elements are sorted by an intrinsic characteristic of the element.
Unordered lists (unordered list): Elements do not have an intrinsic order between them, and they are sorted by their position in the list.
Index list (indexed list): its elements can be referenced by a numeric index.
The list provided in the 1.Java collection API is primarily a support index list.
The 2.Java API does not have any classes that can directly implement the ordered list described above.
Both 3.Arraylist and LinkedList implement the Java.util.List interface.
Method |
Description |
Add (E Element) |
Add an element to the end of the list |
Add (int index,e Element) |
Inserts an element at the specified index |
Get (int index) |
Returns the element at the specified index |
Remove (int index) |
Deletes the element at the specified index |
Remove (E Object) |
Deletes the first occurrence of a specified object |
Set (int index,e element) |
Overrides the element at the specified index |
Size () |
Returns the number of elements in a list |
1. Many common operations can be defined for all types of lists, the difference between these operations is how to add elements.
2.
action |
description |
removefirst |
|
Removelast
|
remove |
|
first |
view elements at the front of the list |
last |
view elements at the end of the list |
contains |
|
isEmpty |
Determine if the list is empty |
size |
Determine the number of elements in the list |
3. Ordered list when you add elements, you only need to use Add, where the location depends on its key value. Unordered list Add operation has three variants: Addtofront (element added to the front of the list) Addtorear (element added to the end of the list) Addafter (add element behind a known element)
Problems in teaching materials learning and the solving process
Problems in code debugging and the resolution process
- Issue 1: When I implemented the Arrayorderedlisttest test, I encountered the problem of displaying the last number when I was shown as null.
Image
- To solve the analysis, when I check the front ArrayList class, I found that when I show last, I will rear-1 accidentally written rear, so it reads the final one behind, so it must be empty.
Code escrow pairing and mutual evaluation
Correct use of markdown syntax (plus 1 points)
Complete features in the template (plus 1 points)
Problems and solutions in textbook learning (plus 3 points)
Problem and resolution in code debugging, no problem
Feelings, experience real (add 1 points)
Reviews seriously, can point out the blog and the Code of the problem (plus 1 points)
Other (sentiment, thinking, etc., optional)
This weekly hours a bit of trouble, the stack is OK, is the list a bit confused.
Learning progress Bar
|
lines of code (new/cumulative) |
Blog Volume (Add/accumulate) |
Learning Time (new/cumulative) |
Important Growth |
Goal |
5000 rows |
30 Articles |
400 hours |
|
First week |
0/0 |
1/1 |
8/8 |
|
Second week |
1306/1306 |
1/2 |
20/28 |
|
Third week |
1291/2597 |
1/3 |
18/46 |
|
Week Four |
4361/6958 |
2/3 |
20/66 |
|
Reference: Why is it so difficult to estimate software engineering applications, software engineering estimation methods
(See more modern software engineering courseware
Software engineer Competency Self-evaluation table)
Resources
20172327 2018-2019-1 "program design and data structure" Fourth Week study summary