Skip to content

Instantly share code, notes, and snippets.

@kaen98
kaen98 / exercise-web-crawler.go
Created May 6, 2020 01:58
Exercise: Web Crawler
View exercise-web-crawler.go
package main
import (
"fmt"
"sync"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
@kaen98
kaen98 / exercise-equivalent-binary-trees.go
Last active May 6, 2020 01:56
Exercise: Equivalent Binary Trees
View exercise-equivalent-binary-trees.go
package main
import (
"golang.org/x/tour/tree"
"fmt"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {