This is an old revision of the document!


Entry Two

Chapter 2.3 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. Our goal is to complete all four steps of the algorithm in constant time to achieve an efficient run time of O(n2). The data structure we chose to represent the free men is a linked list. We used two arrays (arrays of arrays) that will use O(n2) space to represent the women's preference lists and the men's preference lists.The data structures allow each step of the algorithm to take place in constant time (O(1)).

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: 8

courses/cs211/winter2014/journals/emily/entrytwo.1390360472.txt.gz · Last modified: 2014/01/22 03:14 by hardye
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0