Go - Pangram Done

This commit is contained in:
2016-11-26 22:10:28 -06:00
parent 8ff43f2212
commit 4e2f6c22b4
3 changed files with 146 additions and 0 deletions

20
go/pangram/pangram.go Normal file
View File

@@ -0,0 +1,20 @@
package pangram
import "strings"
const testVersion = 1
func IsPangram(inp string) bool {
used := make(map[rune]int)
inp = strings.ToLower(inp)
for _, l := range inp {
used[l] = used[l] + 1
}
for i := 'a'; i <= 'z'; i++ {
if used[i] == 0 {
return false
}
}
return true
}