Lesson 5-15 AP Computer Science Principles

Slides:



Advertisements
Similar presentations
Chapter 3 Brute Force Brute force is a straightforward approach to solving a problem, usually directly based on the problem’s statement and definitions.
Advertisements

Midterm 2 Overview Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
General Computer Science for Engineers CISC 106 Lecture 19 Dr. John Cavazos Computer and Information Sciences 04/06/2009.
Searching and Sorting SLA Computer Science 4/16/08 Allison Mishkin.
Object (Data and Algorithm) Analysis Cmput Lecture 5 Department of Computing Science University of Alberta ©Duane Szafron 1999 Some code in this.
General Computer Science for Engineers CISC 106 Lecture 08
Lecture 14: A Programming Example: Sorting Yoni Fridman 7/24/01 7/24/01.
CSE1301 Computer Programming: Lecture 32 List Sorting.
The Binary Heap. Binary Heap Looks similar to a binary search tree BUT all the values stored in the subtree rooted at a node are greater than or equal.
General Computer Science for Engineers CISC 106 Lecture 2^4 Roger Craig Computer and Information Sciences 03/23/2009.
New Mexico Computer Science For All Search Algorithms Maureen Psaila-Dombrowski.
CS 106 Introduction to Computer Science I 03 / 02 / 2007 Instructor: Michael Eckmann.
Searching Topics Sequential Search Binary Search.
Lists and Sorting Algorithms Exploring Computer Science – Lesson 2-7.
Searching and Sorting Copyright Prentice Hall (with additions / modifications by Evan Korth)
CPS120: Introduction to Computer Science Sorting.
Copyright Prentice Hall Modified by Sana odeh, NYU
Searching Arrays Linear search Binary search small arrays
© 2017 Pearson Education, Hoboken, NJ. All rights reserved
The Need for Algorithms
Creativity of Algorithms & Simple JavaScript Commands
Canvas and Arrays in Apps
Linear and Binary Search Algorithms
Lesson 1-15 AP Computer Science Principles
Lesson 2-3 AP Computer Science Principles
Fundamentals of Java: AP Computer Science Essentials, 4th Edition
Unit 5 Lesson 3: Introduction to Arrays
CMSC201 Computer Science I for Majors Lecture 23 – Sorting
Creating Functions with Parameters
Functions and Top-Down Design
Unit 3 lesson 2&3 The Need For Algorithms- Creativity in Algorithms
Lists and Sorting Algorithms
Creativity in Algorithms
ECET 370 Slingshot Academy / ecet370.com
Building an App: Color Sleuth
Alg2_1c Extra Material for Alg2_1
The Need for Algorithms 2 days
Looping and Random Numbers
The Need for Addressing
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer.
Binary Search Trees (I)
Sending Bits on the Internet
Compound Conditional Logic
ECET 370 HELPS Lessons in Excellence- -ecet370helps.com.
Topics discussed in this section:
Sorting Data are arranged according to their values.
Topics discussed in this section:
Intro to Computer Science CS1510 Dr. Sarah Diesburg
ㅎㅎ Fourth step for Learning C++ Programming Two functions
Last Class We Covered Data representation Binary numbers ASCII values
Chapter 8 Arrays Objectives
Lesson 15: Processing Arrays
Big O Notation.
MSIS 655 Advanced Business Applications Programming
Sorting Data are arranged according to their values.
CSE 214 – Computer Science II B-Trees
C Arrays (2) (Chapter 6) ECET 264.
Binary Trees: Motivation
Given value and sorted array, find index.
Chapter 8 Arrays Objectives
Can you think of 2 purposes of the operating system?
Sorting Develop a sorting algorithm
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Algorithms Assessment (Computer Science) Date :
Binary Search Counting
Unit 2: Computational Thinking, Algorithms & Programming
WJEC GCSE Computer Science
U3L2 The Need For Algorithms
Applications of Arrays
CMPT 225 Lecture 16 – Heap Sort.
Presentation transcript:

Lesson 5-15 AP Computer Science Principles Processing Arrays Lesson 5-15 AP Computer Science Principles

Objectives Students will be able to: Use a for loop in a program to implement an algorithm that processes all elements of an array. Write code that implements a linear search on an unsorted array of numbers. Write code to find the minimum value in an unsorted list of numbers. Explain how binary search is more efficient than linear search but can only be used on sorted lists.

Processing Lists Today we’re going to begin to write code to process lists of data. Processing large lists of data is one of the most powerful things computer programs can do. Many of the most important algorithms in computer science have their roots in processing lists of data. As a warm-up, we’ll begin thinking about algorithms that process lists with a short activity.

Minimal Card - Rules Remember in a lesson a while back when we wrote algorithms for playing cards using the “Human Machine Language”? Notice how a row of cards is kind of like a list. Today we’re going to begin to write code to process lists of data. Processing large lists of data is one of the most powerful things computer programs can do. Many of the most important algorithms in computer science have their roots in processing lists of data. So as a warm-up today, lets think back to algorithms that process lists with a short activity.

Activity - Minimum Card Algorithm Complete the “Activity - Minimum Card Algorithm”

Video

Stage 15 Complete Stage 15