18-Algorithms

18-Algorithms - Chapter XVIII Algorithms Chapter XVIII...

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

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter XVIII Algorithms Chapter XVIII Topics 18.1 Introduction 18.2 The List Case Study 18.3 Improving Input and Output 18.4 The Linear Search 18.5 The Bubble Sort 18.6 Array Insertion and Deletion 18.7 The Selection Sort 18.8 The Insertion Sort 18.9 The Binary Search 18.10 Sorting an Array of Records 18.11 The Merge Sort 18.12 Testing Algorithm Efficiency with TimeTest 18.13 Informal Algorithmic Analysis 18.14 Exact Calculation of Execution Counts 18.15 Summary Chapter XVIII Algorithms 917 18.1 Introduction We need to take a Java break with this chapter. There will be no significant new Java language features introduced. Do keep remembering that you are learning introductory computer science concepts and the language Java is used to teach these concepts. At most high schools BASIC, Pascal, C and C++ were used in computer science before switching to Java. In college you will see a bigger variety in introductory computer science classes. Java is certainly popular, but so are Scheme, Visual BASIC, C++ and other languages, and the choice of the introductory computer science programming language changes quite frequently. This chapter, however, focuses on an area that does not have many changes: the algorithms used in computer programming. The algorithms that are presented in this chapter are essentially unchanged from earlier chapters in BASIC, Pascal and C++ books. Sure the language syntax is different, but the essence of the algorithm is unchanged. Do you remember what an algorithm is? Algorithm Definition An algorithm is a step-by-step solution to a problem. Niklaus Wirths Programming Language Definition Niklaus Wirth, the creator of the programming language Pascal, made the following equation about data structures and algorithms. Data Structures + Algorithms = Programs You have done quite a variety of program assignments at this stage and each program required the creation of an algorithm. There were times when you repeated the same types of algorithms for different assignments. The aim of this chapter is to look at a group of practical algorithms that are commonly used in computer science. In particular we want to look at computer program algorithms that are used to process array information. 918 Exposure Java 2009, APCS Edition 08-08-09 This chapter also emphasizes the recurring theme of computer science, not to reinvent the wheel . If practical algorithms have been created for certain situations, use them, store them, and reuse them as some later date. Time is too precious to start from scratch with every program when useful tools have already been created. By the end of this chapter I hope that your programming toolbox will be considerably expanded....
View Full Document

This note was uploaded on 10/14/2010 for the course APSC AP taught by Professor Kurt during the Spring '98 term at Wooster.

Page1 / 92

18-Algorithms - Chapter XVIII Algorithms Chapter XVIII...

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

View Full Document
Ask a homework question - tutors are online