Software Engineering exists within two primary constraints:
•Process execution speed
•Relative memory allocation
Each application performs under these limitations. The problem emerges when a "user" is introduced into the equation. Realizing that we are building with an end user(a human like you and I) in mind is pivotal to success.
"Latency is a measure of time delay experienced in a system. Limits the maximum rate that information can be transmitted, as there is often a limit on the amount of information that is "in-flight" at any one moment. In the field of human-machine interaction, perceptible latency has a strong effect on user satisfaction and usability."
- Sorting data
- Searching data
- Storing data
- It's easier to store data of different sizes in a linked list. An array assumes every element is exactly the same size.
- As you mentioned, it's easier for a linked list to grow organically. An array's size needs to be known ahead of time, or re-created when it needs to grow.
- Shuffling a linked list is just a matter of changing what points to what. Shuffling an array is more complicated and/or takes more memory.
- As long as your iterations all happen in a "foreach" context, you don't lose any performance in iteration.
Time complexity is a popular term and gage for the number and cost of each of these algorithms computations.
|The algorithm to know what data structure to use.|
combination of arrays with small lists attached to each array element. Hashing function is used to compute a value for an element. To insert, compute the hash, use it to find a list in the array, then add the element into the list.
To lookup an element, compute the hash value, find the list in the array and walk through it. Getting the hashing function right, and experimenting with the size of the array, are important.
A divide and conquer data structure. Logarithmic performance. Binary Tree, B tree, balanced trees.
Must be built dynamically. Cheap insertion at beginning,
storage fits data exactly. Good for dynamic small sets of data. Usually one by adding 'next' pointer to structure.
great for compile time data. Continuous blocks of memory. Good for data where the size is known, or relatively static. Can be built at compile-time, or dynamically at run-time.