Algorithms

Spring 2017
course
navigation

Feb 2

homework

We'll discuss the homework.
My solutions are at code/hw_feb2.
Type typical is_substring method is O(m*n)) where m, n are the string lengths. For a varying length of the longer string (n), this is O(n).

abstract data types

Next chapter in the textbook
Parts that I am not going to emphasize:
These are import conceptually, both in terms of theoretical constructs for describing algorithms and their O() behavior, and practically in terms of implementing programming language constructs.
It's important to understand the notion of a "pointer" (which is a term from the C programming language) and what that looks like in python. This is essentially the difference between the name of something in computer memory - or a reference to that data in memory - and the value stored at that data location. It is these pointers or references which allow us to build linked lists, and later trees and graphs, as data structures.
I'll walk through the textbook's discussion and/or code in class, and continue on Thursday.
We may also look at a bit of C for comparison - we'll see (so to speak).
http://cs.marlboro.edu/ courses/ spring2017/algorithms/ notes/ Feb_2
last modified Wednesday February 1 2017 9:57 pm EST