CS226 -- Day 01 -- 1/28/13 Syllabus: http://www.cs.jhu.edu/~joanne/cs226/syllabus.shtml Survey: https://www.surveymonkey.com/s/W8RMJ6N Piazza Signup: piazza.com/jhu/spring2013/600226 CS Account forms, JDK, Eclipse Binary decision tree using index cards: individuals, pairs, quads, 8s - what is an algorithm? - what is a data structure? An Algorithm is: a terminating unambiguous ordered set of instructions that performs a specific task 1) A sequence of steps that creates something or solves a problem. 2) An ordered series of steps designed to accomplish a specific task. 3) A series of ordered steps to solve a specific problem. 4) A series of sequential steps with the purpose and intent to achieve a goal or complete a task. 5) A bunch of functions which are put together to do some specific task. It involves some instructions which are needed to be followed. 6) Ordered set of instructions for peforming an action to solve a problem. 7) a bird 8) a sequence of steps to accomplish a task 9) a set of instructions to manipulate data and achieve a significant output A Data Structure is: an organization of stored data and set of operations to manipulate it 1) A structure that holds data in a logical way that can be accessed. 2) A construct to organize and store data and information about that data. 3) A method of storing & organizing information. 4) A knowledge of dealing, manipulating, structuring, sorting and organizing data. 5) How information is saved and accessed in a computer. 6) A representation of information that can be accessed, added, manipulated or deleted. 7) a piece of playground equipment 8) a system by which data is organized, stored and retrieved 9) an organized method of performing operations on a set of data How many index cards did we use? (Was it an efficient process?) 67 + 34 + 17 + 9 The process can be represented by a binary tree like this: root / \ . . / \ / \ . . . . / \ / \ / \ / \ . . . . . . . . / \ / \ / \ / \ / \ / \ / \ / \ This is an example of a non-linear (non-sequential) data structure that we'll be using later in the course. Discussion: Why are data structures useful? How do we become better programmers? - efficiency - memory, no leaks - time, # operations - typing - readable code - reusable code, generic - better testing