2 Pages

51

Course: CSC 153, Spring 2009
School: Grinnell
Rating:
 
 
 
 
 

Word Count: 509

Document Preview

2004S, CSC153 Class 51: The Dictionary ADT Admin: * Interesting convo yesterday; Almost all the students there were there to have their name announced. * Questions on HW 8? * Hmmm ... there are 13 students preregistered for each of my two classes. (CSC152-CSII and CSC223-Software Design.) * The picnic may move to the science elbow. Announcement at 1ish. Overview: * Dictionary Basics * Applying Dictionaries *...

Register Now

Unformatted Document Excerpt

Coursehero >> Iowa >> Grinnell >> CSC 153

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
2004S, CSC153 Class 51: The Dictionary ADT Admin: * Interesting convo yesterday; Almost all the students there were there to have their name announced. * Questions on HW 8? * Hmmm ... there are 13 students preregistered for each of my two classes. (CSC152-CSII and CSC223-Software Design.) * The picnic may move to the science elbow. Announcement at 1ish. Overview: * Dictionary Basics * Applying Dictionaries * Dictionary Methods * Dictionaries vs. Databases * Implementation 1: Lists * Implementation 2: BSTs The Dictionary ADT * Philosophy * Applications * Methods Philosophy of the Dictionary ADT * Like arrays, but indexed by arbitrary objects rather than integers * Typically, strings are used as the indices * The indices are called "keys" Applications: * Build "real" dictionaries (associate a definition with a word) * Indexing collections of stuff * Counting words * Sets Design questions: * Can you have more than one value associated with an index? Typically no. * However, you can make a list the associated value. * Are the keys homogenous or heterogeneous? All objects * Are the associated values homogenous or hextexroxgenyqeous? All objects Methods: * Object get(Object key) * If the key is not in the dictionary, could throw an exception or *return null* * Returning null: A lot like arrays of objects: If you don't put something in a space, null is there. * Object set(Object key, Object value) * If the key is already in the dictionary, overwrite and return the old object * Object getKey(Object value) - Returns *a* key of the object. * Some iteration method * Iterate key/value Pairs * Iterate * keys Iterate values ['Eh] * Constructors * Object remove(Object key) * Vs. setting to null * void clear() * void dump(OutputStream pen) -> Better implemented by making it serializable? * String toString() Implementation (Data Structures): * Philosophy * Efficiency * Details Philsophy 1: Use an unordered list or an array. Put key/value pairs in the list or array. * Efficiency: * set: O(1): Replace the head and change your pointer; Whoops ... if it has to check for an existing key/value pair, O(n) * get: O(n) Philosophy 2: Use an ordered array (assumes keys can be compared) * Efficiency: * set: O(n), since we may have to "shove everything over" * get: O(logn) Philosophy 3: Use a tree (Binary Search Trees: BST) (assumes keys can be compared) * Binary trees with key/value pairs in which the keys of left descendants of a node are less than the key of the node and keys of right descendants are greater * Efficiency (Assume the tree is close to complete) ...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Grinnell - CSC - 153
CSC153 2004S, Class 54: Discussion of Exam 3 and other StuffAdmin:* Exam 3 graded and Lakers lost! Yay!* I am so pleased to have Joe and Chase and Erik and Saul here today.* Hmmm . I am returning harshly graded exams today and you are evaluatin
Grinnell - CSC - 153
CSC153 2004S, Class 44: Implementing Lists with Nodes (Linked Lists)Admin:* Today's prospective: * Jesse, WV, Dartmouth et al., Open Source* Saul's personal hero speaks tonight at 8:30 * Saul says "I know I'm going to be there tonight." * S
Grinnell - CSC - 153
CSC153 2004S, Class 51: The Dictionary ADTAdmin:* Interesting convo yesterday; Almost all the students there were there to have their name announced.* Questions on HW 8?* Hmmm . there are 13 students preregistered for each of my two classes. (CS
Grinnell - CSC - 153
Things Erik (and other people) wants me to teach in the next week* Reading input
Grinnell - CSC - 153
CSC153, Class 55: Wrapup/EvalAdmin:* Monday, 11:30, Darby lot. Be there. After this summer, new students won't know about "Darby lot" (partially because Darby won't exist, partially because the lot won't exist, eitehr)Overview:* Evaluation fo
Grinnell - CSC - 153
CSC153 2004S, Class 54: Discussion of Exam 3 and other StuffAdmin:* Exam 3 graded and Lakers lost! Yay!* I am so pleased to have Joe and Chase and Erik and Saul here today.* Hmmm . I am returning harshly graded exams today and you are evaluatin
Grinnell - CSC - 153
CSC153 2004S, Class 32: Conditionals in JavaAdmin:* This week: Conclude Java language issues (I hope)* Read "Loops in Java" for Wednesday* I hope you had a great break* Add the following line to the end of your .bashrc (e.g., with "gedit .bashr
Grinnell - CSC - 153
CSC153 2004S, Class 10: Local Procedure BindingsAdmin:* What does the acronym "PPC" mean to you? * Mostly because Erik is looking at PSP * Sam gets to fix his review* Read "Variable Arity Procedures"* Today's class is mostly lab (to compensa
Grinnell - CSC - 153
CSC153 2004S, Class 42: Designing List ADTsAdmin:* About preregistration and the CS major * Fall * CSC223: Software Design (Stuck with Sam) * [223 or 362-Compilers] * CSC213: Operating Systems (CSC201 prereq) * [213 or 211-Architecture]
Grinnell - CSC - 153
CSC153 2004S, Class 45: Linked ListsAdmin:* Exam 3 due* Cool talk today at 4:15 (snacks) / 4:30 (talk)* Unknown temperature convo tomorrow* *Short* report on Monday's talk?Overview:* Detour: Implementing <code>isValid</code>* Linked lists:
Grinnell - CSC - 153
CSC153 2004S, Class 13: Pause for BreathAdmin:* Homework 3 due. * I'll treat the second part as extra credit.* Homework 1 graded.* Homework 2 & 3? to be graded tonight (I hope).* Questions on the exam?* Sam will be unavailable most of the we
Grinnell - CSC - 153
CSC153, Class 39: PolymorphismAdmin:* About my morning* Homework 5 due* Questions on homework 6?* No reading this weekend* Prospies today! FunOverview:* Inheritance, reviewed* Polymorphism, reviewed* A small Rational example* Lab: O3.1,
Grinnell - CSC - 153
CSC153 2004S, Class 9: Preconditions and PostconditionsAdmin* HW1 not graded yet* Interesting Convo tomorrow* Read "Local Procedure Bindings with letrec"* Lots of discussion today, just a little lab* Test coming: Distributed next Monday, due a
Grinnell - CSC - 153
CSC153 2004S, Class 35: Rational NumbersAdmin:* Quick survey!* Homework questions at end of class.* Please be nice to the prospies.Overview:* Review: Java* Review: Rational.java* Computing gcd* Doing math* Testing* Constructors* HW5Re
Grinnell - CSC - 153
CSC153 2004S, Class 48: Priority QueuesAdmin* Lots to cover today; avoid distractions* Class may be cancelled on Wednesday; Homework still due* Questions on HW7? * Why a circularly-linked doubly-linked list? Because you learn by building one.
Grinnell - CSC - 153
CSC153 2004S, Class 11: Variable-Arity ProceduresAdmin:* Cool talk at 2:15 on Monday: ACM Code of Ethics* Cool talk at 4:30 on Monday: Usability and GUI Design* Read: Characters in Scheme, Strings in Scheme* HW: Scoring Bliv* Does anyone print
W. Alabama - ECE - 427
<canvas width="800" height="800"> <!- <textArray name="zzzz" /> <class name="textArray" oninit = "this.start()" > <attribute name="length" value="0"/> <method name="start"> / var A = new Array() var contents = n
W. Alabama - ECE - 427
January 28, 2002ECE 427 Handout #3 Logic Synthesis with SynopsysSanjay Singh, Lab InstructorThe purpose of this tutorial is to introduce the knowledge required to synthesize the gate-level logic that implements a given design for ECE students usi
W. Alabama - ECE - 427
Tutorial: False Path SolverAndrew Canis and Mark Aagaard March 7, 20081Tutorial SetupYou will need some les to complete this tutorial. Run the following command to copy them to a new directory called crit-path in your working directory: cp -r
Kent State - ACCT - 23020
<?xml version="1.0" encoding="UTF-8"?> <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>e10cd9da280ad42794b50db62af105b9fe2b7d7c.doc</Key><RequestId>B 453C6718F81C917</RequestId><HostId>NVBLTMaNrbi8+WW8NBwBCsgTHxP
Cal Poly - CPE - 329
The Low-Carb VHDL TutorialCopyright: 2004 by Bryan Mealy (08-27-2004)1Table of ContentsTABLE OF CONTENTS LIST OF FIGURES LIST OF TABLES LIST OF EXAMPLES 1 2 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 5 5.1 5.2 5.3 5.4 5.5 5.6 6 INTENT AND
Uni. Westminster - CHAP - 351
INDUSTRY TRENDSEmbedded OSs Gain the Inside TrackSixto Ortiz Jr.The situation will change, she added, as many smaller companies are either acquired or shut down. Eventually, she predicted, the industry will standardize around one or two OSs in e
CSU San Bernardino - CSCI - 610
Tomasulo's AlgorithmDarrion DeMelo CSCI610 Winter 2005 Inst. - Dr. SchubertIn this article, we will be looking at dynamic scheduling using Tomasulo's algorithm. One advantage of using Tomasulo's algorithm is that Read-After-Write (RAW) hazards ar
Kent State - BUSINESS - 66063
<?xml version="1.0" encoding="UTF-8"?> <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>e10cd9da280ad42794b50db62af105b9fe2b7d7c.doc</Key><RequestId>B 453C6718F81C917</RequestId><HostId>NVBLTMaNrbi8+WW8NBwBCsgTHxP
Berkeley - I - 213
Critical Incident Log for Usability Tests conducted on April 23, 2001 This log ignores usability incidents that stemmed from technical problems such as a thumbnail image that was missing due to a bad link. Screen NameQuick SearchTaskOccurrence T
Berkeley - I - 213
SFMOMA-DAM Usability EvaluationDebriefing Questions
Midwestern State University - CSE - 5360
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: hw2.dvi %Pages: 4 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 hw2.dvi %DVIPSParameters: dpi=600, compressed, comment
Midwestern State University - CSE - 5360
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: hw3.dvi %Pages: 3 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 hw3.dvi %DVIPSParameters: dpi=600, compressed, comment
Midwestern State University - CSE - 5360
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: lisp-project.dvi %Pages: 5 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 lisp-project.dvi %DVIPSParameters: dpi=600, c
Midwestern State University - CSE - 5360
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: exam1.dvi %Pages: 10 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 exam1.dvi %DVIPSParameters: dpi=600, compressed, co
Midwestern State University - CSE - 5360
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: exam2.dvi %Pages: 9 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 exam2.dvi %DVIPSParameters: dpi=600, compressed, com
Midwestern State University - CSE - 5360
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: final.dvi %Pages: 12 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 final.dvi %DVIPSParameters: dpi=600, compressed, co
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: hw1.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f hw1.
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: hw1s.dvi %Pages: 4 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f hw1
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: pgm1.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f pgm
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: hw2.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f hw2.
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: hw2s.dvi %Pages: 9 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f hw2
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: e1.dvi %Pages: 12 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f e1.d
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: hw3.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f hw3.
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: pgm3.dvi %Pages: 2 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f pgm
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: dpga.dvi %Pages: 6 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f dpg
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: pgm4.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f pgm
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: hw5.dvi %Pages: 2 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f hw5.
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: hw5s.dvi %Pages: 4 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f hw5
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software %Title: final.dvi %Pages: 16 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: /usr/bin/dvips -O 0cm,1.75cm -f f
Midwestern State University - CPTS - 223
CptS 223 Advanced Data StructuresHomework 4Due: 5:00pm, March 27, 2009 (Late deadline: 5:00pm, March 30, 2009) Total Points: 40 You may submit your solution via email to holder@wsu.edu (preferred), or you may submit hardcopy in class or to my off
Midwestern State University - CPTS - 223
CptS 223 Advanced Data StructuresProgram 4Due: April 3, 2009 (by midnight). For this programming assignment you will modify the BinarySearchTree template class from Program 2 to create a mergeable BinaryHeap template class that does not use an ar
Midwestern State University - CPTS - 223
CptS 223 Advanced Data StructuresHomework 5Due: 5:00pm, April 10, 2009 (Late deadline: 5:00pm, April 13, 2009) Total Points: 40 You may submit your solution via email to holder@wsu.edu (preferred), or you may submit hardcopy in class or to my off
Midwestern State University - CPTS - 223
CptS 223 Advanced Data StructuresProgram 5Due: April 24, 2009 (by midnight). Graphs can be used to represent several different kinds of networks (e.g., computer networks, social networks, etc.). One interesting property of a node in a network (ve
Midwestern State University - CSE - 4316
~ z} y ~ } z z y x v t r |d|{(Cwusqo m l j j pnGRktvRfXhRW W Y h e i W U cgW Y h e tvRfdduGqR2(bvVg a s h w i h a Y T f f Y T T f f vVgRVxVvuteGrqR'gVedb`XVS f W T y f T y w Y T a s U c h p i h a f T c a Y W U TQ 1 H RPIG
Midwestern State University - CSE - 5361
%!PS-Adobe-2.0 %Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software %Title: hw1.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 hw1.dvi %DVIPSParameters: dpi=600, compressed, comment
Midwestern State University - CSE - 5361
%!PS-Adobe-2.0 %Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software %Title: hw3.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 hw3.dvi %DVIPSParameters: dpi=600, compressed, comment
Midwestern State University - CSE - 5361
%!PS-Adobe-2.0 %Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software %Title: hw5.dvi %Pages: 2 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentPaperSizes: Letter %EndComments %DVIPSCommandLine: dvips -f -N0 hw5.dvi %DVIPSParameters:
Midwestern State University - CSE - 5361
%!PS-Adobe-2.0 %Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software %Title: syllabus.dvi %Pages: 2 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 syllabus.dvi %DVIPSParameters: dpi=600, compresse
Midwestern State University - CSE - 5361
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: hw2.dvi %Pages: 2 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 hw2.dvi %DVIPSParameters: dpi=600, compressed, comment
Midwestern State University - CSE - 5361
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: hw3.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 hw3.dvi %DVIPSParameters: dpi=600, compressed, comment
Midwestern State University - CSE - 5361
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: project.dvi %Pages: 2 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 project.dvi %DVIPSParameters: dpi=600, compressed,
Midwestern State University - CSE - 5361
%!PS-Adobe-2.0 %Creator: dvipsk 5.58b Copyright 1986, 1994 Radical Eye Software %Title: syl.dvi %Pages: 2 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: dvips -f -N0 syl.dvi %DVIPSParameters: dpi=600, compressed, comment
Midwestern State University - CSE - 6363
beorPprpure5sz|pvrrbzv(vourGrrEvpv|Eprp|prizro qrvuiaeguo`wauze%Pa|a|r`aPg t t { { e t x f } f f x x e f } f x f e } x e w a`yuum|tmg`ae`g`auPPa|xgun f sP`a|f v|ta(a|y`wa{ga"P|auuP`
Midwestern State University - CSE - 6363
An Apriori-based Algorithm for Mining Frequent Substructures from Graph DataAkihiro Inokuchi? , Takashi Washio and Hiroshi MotodaI.S.I.R., Osaka University 8-1, Mihogaoka, Ibarakishi, Osaka, 567-0047, Japan Phone: +81-6-6879-8541 Fax: +81-6-6879-8
Midwestern State University - CSE - 2320
%!PS-Adobe-2.0 %Creator: dvips(k) 5.78 Copyright 1998 Radical Eye Software (www.radicaleye.com) %Title: hw1.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 596 842 %EndComments %DVIPSCommandLine: dvips -f -N0 hw1.dvi %DVIPSParameters: dpi=600, com