CS 132 Exam #1 - Study Suggestions

Similar documents
CS Exam 2 Study Suggestions

CS Final Exam Review Suggestions - Fall 2017

CS Final Exam Review Suggestions - Spring 2014

Curriculum Map Grade(s): Subject: AP Computer Science

CIS 130 Exam #2 Review Suggestions

QUIZ. 0] Define arrays 1] Define records 2] How are arrays and records: (a) similar? (b) different?

CS 61B Summer 2005 (Porter) Midterm 2 July 21, SOLUTIONS. Do not open until told to begin

Lecture 7. Log into Linux New documents posted to course webpage

Sorting Pearson Education, Inc. All rights reserved.

CS Exam 1 Review Suggestions - Spring 2017

CS 216 Fall 2007 Midterm 1 Page 1 of 10 Name: ID:

Homework 11 Program Setup (with some IMPORTANT NEW STEPS!)

CS 1110, LAB 12: SEQUENCE ALGORITHMS First Name: Last Name: NetID:

Data Structures - Section FG

Faster Sorting Methods

Computer Science Spring 2005 Final Examination, May 12, 2005

CS Final Exam Review Suggestions

Assignment 2. CS 234 Fall 2018 Sandy Graham. Create()

Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122

Deadline. Purpose. How to submit. Important notes. CS Homework 9. CS Homework 9 p :59 pm on Friday, April 7, 2017

CSC 273 Data Structures

Outline. Computer Science 331. Course Information. Assessment. Contact Information Assessment. Introduction to CPSC 331

Data Structures. Lecture 1: Introduction CSC212. Instructor: George Wolberg Department of Computer Science City College of New York

Ch 8. Searching and Sorting Arrays Part 1. Definitions of Search and Sort

CS126 Final Exam Review

Introduction to Programming System Design CSCI 455x (4 Units)

IMACS: AP Computer Science A

CS583 Lecture 01. Jana Kosecka. some materials here are based on Profs. E. Demaine, D. Luebke A.Shehu, J-M. Lien and Prof. Wang s past lecture notes

CS Homework 10 p. 1. CS Homework 10

CLASSIC DATA STRUCTURES IN JAVA

Boca Raton Community High School AP Computer Science A - Syllabus 2009/10

Midterm Exam #2 Review. CS 2308 :: Spring 2016 Molly O'Neil

Advances in Programming Languages

! Mon, May 5, 2:00PM to 4:30PM. ! Closed book, closed notes, clean desk. ! Comprehensive (covers entire course) ! 30% of your final grade

CS 483. Jana Kosecka CS Dept Eng. Building

CS 445: Data Structures Final Examination: Study Guide

During the first 2 weeks of class, all students in the course will take an in-lab programming exam. This is the Exam in Programming Proficiency.

CS 1110: Introduction to Computing Using Python Loop Invariants

Algorithms Lab 4. Review. In lab exercises: Collaboration level : 0. Topics covered this week:

CS2013 Course Syllabus Spring 2018 Lecture: Mon/Wed 2:00 P.M. 2:50 P.M. SH C259 Lab: Mon/Wed 2:50 P.M. 4:00 P.M. SH C259

Real-world sorting (not on exam)

COMP26120 Academic Session: Lab Exercise 6: Recursive Sorting and Searching

CS 163 Practice Final Exam Winter 2012

AP Computer Science AB

COP 1220 Introduction to Programming in C++ Course Justification

S.E. (Computer) (First Semester) EXAMINATION, 2011 DATA STRUCTURES AND ALGORITHM (2008 PATTERN) Time : Three Hours Maximum Marks : 100

CS Homework 11 p. 1. CS Homework 11

Outline. Review of Last Week II. Review of Last Week. Computer Memory. Review Variables and Memory. February 7, Data Types

PREPARING FOR PRELIM 2

+ Abstract Data Types

About this exam review

EECS 1001 and EECS 1030, lab 01 Conflict

Object-oriented programming. and data-structures CS/ENGRD 2110 SUMMER 2018

CS16 Exam #1 7/17/ Minutes 100 Points total

Introduction to Computer Science

Halting Measures and Termination Arguments

CS 261 Data Structures. Big-Oh Analysis: A Review

CS183 Software Design. Textbooks. Grading Criteria. CS183-Su02-Lecture 1 20 May by Eric A. Durant, Ph.D. 1

Prelim 2. CS 2110, 16 November 2017, 7:30 PM Total Question Name Short Heaps Tree Collections Sorting Graph

SEARCHING, SORTING, AND ASYMPTOTIC COMPLEXITY. Lecture 11 CS2110 Spring 2016

York University. AP/ITEC Section M INTRODUCTION TO DATA STRUCTURES Winter Midterm Test

You must include this cover sheet. Either type up the assignment using theory3.tex, or print out this PDF.

CS302 - Data Structures using C++

Chapter 1: Principles of Programming and Software Engineering

More on Arrays CS 16: Solving Problems with Computers I Lecture #13

Exam Sample Questions CS3212: Algorithms and Data Structures

CS Homework 11 p. 1. CS Homework 11

Introduction p. 1 Pseudocode p. 2 Algorithm Header p. 2 Purpose, Conditions, and Return p. 3 Statement Numbers p. 4 Variables p. 4 Algorithm Analysis

CSCI 6620 Data Structures

CS 210 Algorithms and Data Structures College of Information Technology and Engineering Weisberg Division of Engineering and Computer Science

Run Time Environment

COMP251: Algorithms and Data Structures. Jérôme Waldispühl School of Computer Science McGill University

CS 170 Java Programming 1. Week 13: Classes, Testing, Debugging

Exam I Principles of Imperative Computation, Summer 2011 William Lovas. May 27, 2011

Today. CISC101 Reminders & Notes. Searching in Python - Cont. Searching in Python. From last time

CS Exam 1 Review Suggestions

Python review. 1 Python basics. References. CS 234 Naomi Nishimura

Algorithms and Data Structures (INF1) Lecture 15/15 Hua Lu

CS 215 Fundamentals of Programming II Spring 2011 Project 2

Searching for Information. A Simple Method for Searching. Simple Searching. Class #21: Searching/Sorting I

CSE 332 Spring 2013: Midterm Exam (closed book, closed notes, no calculators)

Binary Search Trees Treesort

Problem 1. Multiple Choice (choose only one answer)

Topics Applications Most Common Methods Serial Search Binary Search Search by Hashing (next lecture) Run-Time Analysis Average-time analysis Time anal

CS302: Fundamental Algorithms (and Data Structures)

Data Structures and Algorithms 1

CS 314 Exam 2 Spring

CS 106B, Lecture 1 Introduction to C++

CS 12 Fall 2003 Solutions for mid-term exam #2

Computer Programming II C++ (830)

Algorithm Efficiency & Sorting. Algorithm efficiency Big-O notation Searching algorithms Sorting algorithms

what is an algorithm? analysis of algorithms classic algorithm example: search

QUIZ. Source:

Reviewing all Topics this term

CSCI 102L - Data Structures Midterm Exam #2 Spring 2011

Two Types of Types. Primitive Types in Java. Using Primitive Variables. Class #07: Java Primitives. Integer types.

CS 311 Data Structures and Algorithms, Spring 2009 Midterm Exam Solutions. The Midterm Exam was given in class on Wednesday, March 18, 2009.

ASYMPTOTIC COMPLEXITY

Before Class Install SDCC Instructions in Installing_SiLabs-SDCC- Drivers document. Solutions to Number Systems Worksheet. Announcements.

PREPARING FOR PRELIM 1

Transcription:

CS 132 - Exam #1 Study Suggestions p. 1 * last modified: 2-16-05 CS 132 Exam #1 - Study Suggestions * The test covers through HW #3, the Week 5 Lab Exercise Exercise, and material through the 2-14-05 lecture/2-16-05 lab. * Anything that has been covered in assigned reading is fair game; * Anything that has been covered in lecture is fair game; * Anything covered in a course handout is fair game; * Anything that has been covered in a lab exercise or homework assignment is ESPECIALLY fair game. * But, these are some especially-significant topics to help you in your studying for the exam. * You are responsible for being familiar with, and following, the class style guidelines. * The exam will be closed-book and closed-notes, and you are expected to work individually. * Test format: will likely be short answer, possibly with a smattering of multiple-choice questions. * All you need to provide is a pen or a pencil; * EXPECT to have to read and write C++ code, pseudocode, UML notation. * note that you could definitely be given code and asked questions about it, as in the Week 4 Lab Exercise (answering questions about the different sort implementations). * the only aspect of namespaces that you are responsible for on this exam is that you need to use using namespace std; after #include'ing standard libraries in modern, standard C++. * data structures * what is a data structure? an organized collection of data... * what is an abstract data type (adt)? a collection of data PLUS all of the operations for acting on that data; * phases of software development and program design recipe handouts * be comfortable with the basic phases of software development as given in the course text; be comfortable with the basic function design recipe discussed. * especially: for a function, 1. figuring out what data is involved (data analysis),

CS 132 - Exam #1 Study Suggestions p. 2 2. then writing a CONTRACT, 3. then writing the HEADER corresponding to that contract (here, remember, we mean the first line of the *implementation*/definition, NOT the prototype/declaration/what goes in the.h file) 4. then writing the PURPOSE, INCLUDING the parameter names appropriately, writing PRECONDITIONS and POSTCONDITIONS if called for, 5. then writing the EXAMPLES, actual example calles of the function, including what the function returns or does as a result of that call, 6. and only THEN devising its algorithm, and then translating that algorithm into code. * what is the class "syntax"/notation for a function contract? Given a non-main function or its description, you should be able to write a contract using this syntax/notation. * in this class, what should be incorporated into the Purpose: statement of a function that has parameters? * what is a precondition? what is a postcondition? what are the expectations for these? * you should be able to read and write assert statements to verify a function's preconditions (for preconditions for which such tests are reasonable); you should know what happens when an assert's condition is false. * what goes in the Examples: section of a "regular" function's opening comment block, in this class? How do we write these when the function returns, say, an int? * when should you come up with specific examples for a function or method? (BEFORE you write it!) * Given a function and/or its description, you should be able to write examples that adequately test it (cover all major categories of input and boundaries between those categories). * be comfortable reading and appropriately writing code using EXIT_SUCCESS and EXIT_FAILURE. (remember the class conding standards regarding these.)

CS 132 - Exam #1 Study Suggestions p. 3 * should be able to read, write tester programs (testing main functions) as you have been doing in class assignments. * Lab and C++-related details * how can you compile a C++ function on cs-server? how can you compile and link a C++ program on cs-server? * what should go in a.h file for a non-main function being written in its own file? How does another function use a non-main function written in its own file? * how can you redirect screen output to a file in UNIX? * how should you declare a named constant in this class? (be familiar with both the syntax, its meaning, and the class style standards for named constants) * Within a class, how many "copies" of a thing declared to be static are there? * running time analysis * what is big-o notation? What does it mean? How can it be useful? * given a formula representing the number of steps that some algorithm requires for a problem of size n, you should be able to give the big-o notation for such an algorithm (for example, as in Week 2 Lab Exercise problem #1) * what is average-case run-time complexity? worst-case? best-case? What are the differences between these? * you should know (or be able to figure out) the run-time complexities for "simple" operations, and express them using big-o notation; * you should know (or be able to figure out) the average-, worst-, and best-case time complexities for: * sequential search and binary search * selection sort, insertion sort, bubblesort, merge sort, quicksort, and radix sort * what phrase is equivalent to O(1)? to O(n)? to O(log n)? to O(n 2 )? to O(2 n )? * except for O(2 n ), you should be able to give an example of an algorithm that takes that average-case running-time; you should be able to give an example of an algorithm that average-case running time for O(n log n), also. * (remember: in computer science, when log n is written, base 2 is assumed.) * recursion * what is a recursive definition? what is a recursive function?

CS 132 - Exam #1 Study Suggestions p. 4 * requirements for "good" recursion! * given a function --- does it demonstrate "good" recursion or not? Why? Why not? * what is a "base" case? Does every recursive function need one? Can a recursive function have more than one? * what is a recursive case? Does every recursive function need one? Can a recursive function have more than one? * given a recursive function, you should be able to tell what it would produce for a call of that function; given a specific call to that function, you can give the results of that call. * you may be asked to write a recursive function. * searching * you are responsible for knowing sequential search and binary search. * you should be able to describe the basic algorithm for each; you should know their run-time complexities. * if code was given,you should be able to recognize which of the above is being implemented within that code. * (frankly, you should be able to code some version of sequential search at the drop of a hat...) * you should be able to reason about variations on these basic algorithms * sorting * you are responsible for knowing selection sort, insertion sort, bubblesort, merge sort, quicksort, and radix sort * you should be able to describe the basic algorithm for each; you should know their run-time complexities. * if code was given, you should be able to recognize which of the above is being implemented within that code. * you should be able to reason about variations on these basic algorithms (using bubblesort within quicksort when the list size is sufficiently small, for example)

CS 132 - Exam #1 Study Suggestions p. 5 * introduction to container classes and bags * what do we mean by a container class? * for this exam, you are responsible for the idea of bags, for the bag class as discussed in lecture, and for how such bags can be used; you should be comfortable with their static-array and dynamic-array implementations, also. * you should be able to read and use a data structure with a given "UML" such as that given for bag in-lecture (and available from the course web page). You should be able to answer questions based on reading it, and should be able to write code using such a class (as you did in the Week 5 Lab Exercise). * what is an abstract data type (adt)? What are some of the benefits of using a well-designed adt class for a data structure within a program? Be comfortable, too, with such terms as information hiding and abstraction.