MindMap Gallery Data structure mind map
This is a mind map about the four operations of arrays of data structures. The content covers reading elements, finding elements, inserting elements, and deleting elements. Hurry up and collect the picture below to learn!
Edited at 2021-08-07 17:27:15Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
Array operations
Read elements
Reading method
access index
Index details
Indexes generally start from 0
Data details
Data will be stored dispersedly in an ordered memory space
The computer will allocate a continuous memory space for the array in the memory and record the memory address of the data with index 0.
access element
Once the memory address of the element with index 0 is known, the element can be accessed quickly.
time complexity
constant level
O(1)
Find elements
Search method
Save the memory address at index 0 and search backwards from the beginning of the array.
worst case scenario
Search element is the last element of the array
The array does not contain the target element
time complexity
O(N)
insert element
The element is inserted at the end of the array
The computer calculates the memory address of the element to be inserted through the length and position of the array, and then inserts the element into the specified location.
The element is inserted elsewhere in the array
First, you need to make space where the element needs to be inserted, and then perform the insertion operation.
Disadvantages
If you need to insert array elements frequently, it will cause a waste of time.
solution
Linked lists can effectively solve the problem of time waste
Delete element
Delete method
When we delete an element in the array, a vacant position will be left in the array, and subsequent elements need to fill the position.
worst case scenario
When the array length is N, in the worst case, when we delete the first element, the total number of steps required is N steps.
time complexity
O(N)