This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"strings" | |
"sync" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--Summary: | |
// Create a program that utilizes goroutines to run the provided calculation | |
// function on a number of jobs. The results from the goroutines must be | |
// communicated back to the main thread using a channel, and then added | |
// together. | |
// Create reciever and send back | |
//--Requirements: | |
//* Run `longCalculation` for each job generated by the `makeJobs` function | |
//* Each job must be run in a separate goroutine | |
//* The result from `longCalculation` must be provided to the main function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--Summary: | |
// Write a generic function to complete the existing code. | |
// | |
//--Requirements: | |
//* Write a single function named `clamp` that can restrict a value | |
// to a specific range | |
// - The function should work with floating point numbers, integers | |
// and arbitrary type aliases | |
// - Use the existing `clamp` function signature and comments as a | |
// starting point |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--Summary: | |
// Create a system monitoring dashboard using the existing dashboard | |
// component structures. Each array element in the components represent | |
// a 1-second sampling. e.g. for CPU, Network, Memory | |
// | |
//--Requirements: | |
//* Create functions to calculate averages for each dashboard component | |
//* Using struct embedding, create a Dashboard structure that contains | |
// each dashboard component | |
//* Print out a 5-second average from each component using promoted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--Summary: | |
// Create a program to manage lending of library books. | |
// | |
//--Requirements: | |
//* The library must have books and members, and must include: | |
// - Which books have been checked out | |
// - What time the books were checked out | |
// - What time the books were returned | |
//* Perform the following: | |
// - Add at least 4 books and at least 3 members to the library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.List; | |
class Result { | |
private Result(){} | |
/* | |
* Complete the 'bioHazard' function below. | |
* |