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
public class TreeDictionary{ | |
private NodeTreeDictionary root; | |
private class NodeTreeDictionary{ | |
char letter; | |
HashMap<char, NodeTreeDictionary> children; | |
String shortestWord; |
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
/*Go functions may be closures. A closure is a function value that references variables from outside its body. | |
The function may access and assign to the referenced variables; in this sense the function is "bound" to the variables. | |
Implement a fibonacci function that returns a function (a closure) that returns successive fibonacci numbers.*/ | |
package main | |
import "fmt" | |
// fibonacci is a function that returns |
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
public class Ingredient{ | |
public enum Units {ML, CUPS, SPOONS, QUARTS, GRAMS}; | |
private String name; | |
private double quantity; | |
private Units unit; | |
public Ingredient(String name, double quantity, Units unit){ |