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 circle |
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 "fmt" | |
type cat string | |
//String from type cat always meows | |
func (c cat) String() string { | |
return fmt.Sprintf("A Cat always Meows") | |
} |
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 "fmt" | |
type cat string | |
//String from type cat always meows | |
func (c cat) String() string { | |
return fmt.Sprintln("A Cat always Meows") | |
} |
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
//topological sort | |
package main | |
import ( | |
"fmt" | |
"sort" | |
) | |
var pathOfFullstack = map[string][]string{ |
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" | |
"os" | |
"strings" | |
) | |
func main() { |
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 "fmt" | |
//FindGCD - finds the greatest common divisor between two numbers | |
func FindGCD(a, b int) (gcd int) { | |
var list []int | |
for i := 1; i <= smallestNumber(a, b); i++ { | |
if a%i == 0 && b%i == 0 { | |
list = append(list, i) |
NewerOlder