CS 245 Lecture 26 – Heaps and Priority Queues
Agenda what ?s interview questions program this design this heaps TODO Read section 6.5 in the data structures book. 1/4 sheet. Program This Design This Code … Haiku
CS 491 Lecture 25 – Localizable Text
Exercise Not separating model from view in our software makes our model not reusable for other applications. We have tight coupling between our logic and our presentation. Even within our view, however, we can have tight coupling. If we hardcode our American English into labels and currency and date formatting, we make our view not […]
CS 245 Lecture 25 – Binary Search Tree Add, Traverse
Agenda what ?s schedule homework (* this week, 1 next week, 1 during finals) last lab tomorrow final: Friday at 1 PM hw3 demo adding nodes to a BST iterating through a BST deleting nodes from a BST Code KeyValueVisitor.java BinarySearchTree.java Haiku
CS 491 Lecture 24 – OAuth2 Access Tokens
Agenda what ?s final exam time: R 5-7 exercise: getting OAuth2 access tokens Exercise Last time we started integrating access to a Picasa Web account into our mobile apps. All the interaction with the Picasa Web hinged on having a special string—the access token—which we sent along with every request in the Authorization header. We […]
CS 245 Lecture 24 – Binary Search Trees
Agenda what ?s design this isKitten binary search tree vs. sorted array implementing a BST Node isEmpty size get add delete a problem with BSTs: balance Design This Code HashEg.java BinarySearchTree.java Haiku
CS 245 Lecture 23 – Binary Search Trees
Agenda what ?s what does this do? what if we don’t override equals? what if we don’t override hashcode? hashes as a generalization of arrays hashes in C++ hashes in PHP hash/object duality in JavaScript binary search over linked structures the binary search tree What Does This Do? Hash Links Arrays as maps in PHP […]
CS 245 Lecture 22 – Hashtables
Agenda what ?s turning keys into integers turning integers into indices handling collisions of indices chaining vs. linear probing finding word frequencies in Project Gutenberg TODO Read chapter 14 through section 14.2. 1/4 sheet. Lab exercise will be easier if you read this before then. Code Map.java Fastmap.java CountedWord.java FrequentWordFinder.java Haiku
CS 491 Lecture 22 – Working with Picasa Web
Agenda what ?s building a Picasa Web browser recover Exercise Today let’s make a browser for Picasa Web. The overarching design is this: The first screen presents a list of albums. When the user selects an album, the app transitions to a list of pictures in that album. When the user selects a picture, the […]
CS 245 Lecture 21 – The Problem of Lookup
Agenda what ?s what does this do? program this methods for mapping keys to values TODO Read section 7.2 and 7.3. 1/4 sheet. What Does This Do? Lookup We want to map keys to values: names to phone numbers (a phonebook), web addresses to IP addresses (DNS), terms to their definitions (dictionary), words to their […]
CS 245 Lecture 20 – More Stack
Agenda what ?s is-a vs. has-a program this solve this postfix calculator searching the filesystem TODO Write a static method reverseString that accepts a String parameter and returns the reversed version. Use a stack instead of the more straightforward algorithm. 1/4 sheet. Program This Solve This Code Stack.java Postfix.java DiskSearcher.java Haiku