11TablesAndPriorityQueues - CS 240 Chapter 11 Tables And...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 240 Chapter 11 Tables And Priority CS 240 Chapter 11 Tables And Priority 1Page 1 Chapter 11 Tables And Priority Queues Simple arrays and linked lists are not the only structures that can effectively maintain tables of data. Array Implementation of Table Priority Queues Linked List Implementation of Table Heap Implementation of Priority Queue Tree Implementation of Table CS 240 Chapter 11 Tables And Priority CS 240 Chapter 11 Tables And Priority 2Page 2 The Table ADT C C++ Java Perl Python Rexx Tcl Language 3 53 44 16 25 623 40 Runtime 239 233 235 76 80 111 98 Codesize 18 7 45 18 16 15 28 Memory 8 12 10 3 3 6 4 Codetime AT&T AT&T Sun open CWI IBM Sun Developer The concept of a table (or dictionary) abstract data type is intended to facilitate looking up complex records by using one of the data fields as a special search key. For example, the table of programming languages above could be searched by the name of the language, the amount of memory required for a certain test program, the name of the developer, or any of its other fields. CS 240 Chapter 11 Tables And Priority CS 240 Chapter 11 Tables And Priority 3Page 3 Array Implementation of the Table Implementing the table as an array has several advantages: Language: C Developer: AT&T Runtime: 3 Codesize: 239 Memory: 1 Codetime: 8 Language: C++ Developer : AT&T Runtime: 53 Codesize : 233 Memory: 7 Codetime : 12 Language: Java Developer : Sun Runtime: 44 Codesize : 235 Memory: 45 Codetime : 10 Language: Perl Developer : open Runtime: 16 Codesize : 76 Memory: 18 Codetime : 3 Language: Python Developer : CWI Runtime: 25 Codesize : 80 Memory: 16 Codetime : 3 Language: Rexx Developer : IBM Runtime: 623 Codesize : 111 Memory: 15 Codetime : 6 Language: Tcl Developer : Sun Runtime: 40 Codesize : 98 Memory: 28 Codetime : 4 Insertion is efficient if the list is unsorted just insert at the end of the list. If the list is kept sorted by the search key, then a binary search is made possible....
View Full Document

This note was uploaded on 08/26/2009 for the course CS 240 taught by Professor Klein,s during the Spring '08 term at Southern Illinois University Edwardsville.

Page1 / 12

11TablesAndPriorityQueues - CS 240 Chapter 11 Tables And...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online