Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
courses:cs211:winter2014:journals:emily:entrytwo [2014/01/22 04:52] – [2.5 A More Complex Data Structure: Priority Queues] hardye | courses:cs211:winter2014:journals:emily:entrytwo [2014/02/24 20:09] (current) – [2.5 A More Complex Data Structure: Priority Queues] hardye | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Entry Two ====== | ====== Entry Two ====== | ||
- | ====== 2.3 Implementing the Stable Matching Algorithm Using Lists and Arrays====== | + | ====== |
+ | **Implementing the Stable Matching Algorithm Using Lists and Arrays** | ||
In this section of chapter two, we explore the tradeoffs between lists arrays and lists to determine which data is appropriate for the algorithm. Some of the tradeoffs we read about are finding an element in the array or list with given index i, seeing if a given element is an array or list and if the array is sorted or not. An important concept to take away from this section is that preprocessing allows us to convert between the array and list representations in O(n) time, so we are not limited in which data structure we choose and we can freely jump between which one fits the algorithm best! | In this section of chapter two, we explore the tradeoffs between lists arrays and lists to determine which data is appropriate for the algorithm. Some of the tradeoffs we read about are finding an element in the array or list with given index i, seeing if a given element is an array or list and if the array is sorted or not. An important concept to take away from this section is that preprocessing allows us to convert between the array and list representations in O(n) time, so we are not limited in which data structure we choose and we can freely jump between which one fits the algorithm best! | ||
Line 7: | Line 9: | ||
This section did a lot of comparing and contrasting that we went over in detail in class. It was very clear but a lot less interesting because it seemed so repetitive. Readability: | This section did a lot of comparing and contrasting that we went over in detail in class. It was very clear but a lot less interesting because it seemed so repetitive. Readability: | ||
- | ====== 2.4 A Survey of Common Running Times ====== | + | ====== |
+ | **A Survey of Common Running Times** | ||
In this section we analyze common running times: O(n), O(n log n), O(n< | In this section we analyze common running times: O(n), O(n log n), O(n< | ||
* **Linear Time- O(n)** (p.48-50) | * **Linear Time- O(n)** (p.48-50) | ||
Line 47: | Line 51: | ||
This section was a really large chunk of information and took a few times to read to understand. The most confusing part was the sub linear time. Even though I don't have any specific questions, just the general topic confused me. I thought this chapter was pretty interesting although not very easy to read. It was a very good review and important to cover moving on into the next sections. I would rate readability an 8/10. | This section was a really large chunk of information and took a few times to read to understand. The most confusing part was the sub linear time. Even though I don't have any specific questions, just the general topic confused me. I thought this chapter was pretty interesting although not very easy to read. It was a very good review and important to cover moving on into the next sections. I would rate readability an 8/10. | ||
- | ====== 2.5 A More Complex Data Structure: Priority Queues | + | ====== |
+ | **A More Complex Data Structure: Priority Queues | ||
In this section we discuss a very broadly used data structure to help us achieve our goal of improving run time. We discover the different processes a PQ can perform that a list or array can' | In this section we discuss a very broadly used data structure to help us achieve our goal of improving run time. We discover the different processes a PQ can perform that a list or array can' | ||