February 01, 2017
Quicksort is a more efficient sorting algorithm than either
selection or insertion sort
It sorts an array by repeatedly partitioning it
January 25, 2017
What happens when you put a pair of rabbits in a field?
Lets model the rabbit population, with a few assumptions:
Newly-born rabbits ta
January 30, 2017
Algorithm Analysis Simple Sorting
Selection sort is a simple sorting algorithm that repeatedly
finds the smallest item
February 08, 2017
Review: Linked Lists
Linked lists are constructed out of nodes, consisting of
a data element
a pointer to another node
Lists are constructed as chains of such nodes
January 11, 2017
Example: Print Queue
Assume that we want to store data for a print queue for a
Data Structures and Programming
Abstract Data Types
January 04, 2016
Instructor: Geoffrey Tien, [email protected]
Office hours: Tue 14:0015:30, Wed
Analysis / Search
January 23, 2017
It can be difficult to determine the exact number of operations
performed by an algorithm
Though it is often still useful to
January 09, 2017
Imagine an array partially filled with data
And we want to insert an item in a particular position in the middle
Proof by Induction
January 16, 2017
Show an example which does not fit with the theorem
QED (the theorem is disproven)
Assume the opposite of the theorem
January 18, 2017
A task to solve and analyze
Find a student's name in a class given her student ID
Need a data structure for storing class list
A method to search
February 06, 2017
Mergesort is another efficient sorting algorithm
Divide and conquer
Divides an array in half, and merges the two sorted halves
Sorting happens durin
Lab 1C: Technology at Home
1. Which technology are you using at home?
Wet Chat / YouTube
You need to buy a new laptop.
How do you select the right one for you?
Lab 1D: Blogging
Create a public blog using a free blogging site such as blogger.com, wordpress.com,
tumblr.com or any other.
Write two blog posts. about the following topics (pp. 79-84 of our textbook):
Lab 2A Solutions
What are the 8-bit binary numbers for the decimal numbers below?
4 - 00000100
15 - 00001111
21 - 00010101
56 - 00111000
What are the decimal numbers for the binary numbers below?
Lab 2B: Computer Types
Work as a team of two or three. Discuss the questions below. Then write one (or more) paragraph(s)
each to answer the questions.
Use Google docs to collaborate and produce one document. Share this document with each other,
How to buy a laptop?
Central Processing Unit
Speed measured in MHz or GHz
Brain of the computer
Chapter 3: Using the Internet: Making the most out of the Webs Resources
Communicating and Collaborating on the Web (pp.79-84)
Accessing and Moving Around the Web (pp 94-98)
Chapter 2: Looking at Computers: Understanding the Parts
Understanding Your Compu
Lab: Team Presentation on Hardware Basics
Find a team partner and pick one of the following topics to create a presentation for this class.
RAM, ROM or HDD?
Review: RAM, ROM or HDD?
(Answer Key on
1. _ stands for Read Only Memory.
2. In _ every location can be accessed in the same amount of time.
3. _ helps to start up the computer.
Lab 1A: Submit a text file on C4
Use any text editor to create and edit a file for this assignment.
1. Open the text editor (Notepad, Notepad+)
(All Microsoft computers have the text editor called Notepad.
To open Notepad click the Start button on the des