CS 240: Lecture 19 – Mergesort
Dear students: Insertion sort and selection sort can be written in just a few lines of code, but the energy consumption of each of those lines is quite high. Both are $\Theta(n^2)$. Suppose you have a processor that runs at 3.5 gigahertz. That means its clock ticks many times per second. Let’s generously assume that […]
CS 347: Lab 13 – Node Shell
Dear students: Welcome to lab. Now’s your chance to apply the ideas you read about. Find a partner and complete as much of the task below as you can. At the end of our time together, paste your HTML files into Crowdsource in order to receive credit. Converting a Callback to a Promise Imagine you […]
CS 347: Lab 14 – The People’s Dictionary
Dear students: Welcome to lab. Now’s your chance to apply the ideas you read about. Find a partner and complete as much of the task below as you can. At the end of our time together, paste your HTML files into Crowdsource in order to receive credit. The People’s Dictionary Your task in this lab […]
CS 347: Lab 15 – The People’s Dictionary Continued
Dear students: Welcome to lab. Now’s your chance to apply the ideas you read about. Find a partner and complete as much of the task below as you can. At the end of our time together, paste your files into Crowdsource in order to receive credit. Task 1 Your first task in this lab is […]
CS 347: Lab 12 – Rhyme Search
Dear students: Welcome to lab. Now’s your chance to apply the ideas you read about. Find a partner and complete as much of the task below as you can. At the end of our time together, paste your HTML files into Crowdsource in order to receive credit. Task 1 Reverse engineer the following page, which […]
CS 240: Lecture 18 – Sorting
Dear students: Now that we have a new tool for analyzing recursive algorithms, we are ready to start looking at some of those algorithms. The fastest sorting algorithms are recursive. However, the fastest sorting algorithms are also complex. Rather than begin with them, we first look at some simpler but slower sorting algorithms. Tail Recursion […]
CS 240: Lecture 17 – Recurrence Lab
Dear students: Today we will devote our entire time together to a lab on recurrences. Follow these guidelines: Expand your general case out at least three levels to be certain of the pattern. Write your answers out cleanly on paper or screen. Triple-check your algebra. Ask lots of questions. There’s nothing to turn in. TODO […]
CS 347: Lab 11 – Client-side JavaScript
Dear students: Welcome to lab. Now’s your chance to apply the ideas you read about. Find a partner and complete as much of the task below as you can. At the end of our time together, paste your HTML files into Crowdsource in order to receive credit. Task 1 Recreate the following little game: The […]
CS 240: Lecture 16 – Binary Search
Dear students: Even before computers, we humans collected massive amounts of data. We made dictionaries and phonebooks, for example. Finding an entry in our records can be difficult. One option is the sequential search, which looks like this: to search(target) for each record if record matches target return record return null In the worst case, […]
CS 347: Lab 10 – Media Queries Continued
Dear students: Welcome to lab. Now’s your chance to apply the ideas you read about. Find a partner and complete as much of the task below as you can. At the end of our time together, paste your HTML files into Crowdsource in order to receive credit. Dark Mode In addition to querying for details […]