Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
courses:cs211:winter2018:journals:cantrella:chapter_5 [2018/03/13 01:00] – [Section 5.2] cantrellacourses:cs211:winter2018:journals:cantrella:chapter_5 [2018/03/13 01:32] (current) – [Section 5.3] cantrella
Line 9: Line 9:
 This chapter was cool. I give it an 8 on the interesting scale and a 7 for readability. This chapter was cool. I give it an 8 on the interesting scale and a 7 for readability.
 ===== Section 5.3 ===== ===== Section 5.3 =====
 +Section 5.3 was very helpful for me in illuminating the counting inversions problem. While I had a rough understanding of the algorithm during class, the book made the entire concept much clearer.
  
 +The concept behind counting inversions is to compare the similarity of two lists to each other. The idea is to sort and count the inversions in each list, then sort and count the inversions between the now sorted lists. The sorting and inversion of each individual list are not too difficult, but comparing the inversions and sorting the two distinct lists requires a new algorithm. It turns out not to be too crazy, just maintaining pointers on each element of each list, comparing those elements, and counting inversions, adding elements to the final list, and moving pointers along as necessary.
 +
 +Like I said, I found the book to be very helpful in regards to this topic. I give this chapter a 9 for readability and a 9 on the interesting scale.
courses/cs211/winter2018/journals/cantrella/chapter_5.1520902842.txt.gz · Last modified: by cantrella
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0