Skip to content

Commit

Permalink
Total count being tracked
Browse files Browse the repository at this point in the history
  • Loading branch information
nryoung committed May 14, 2015
1 parent b59c0aa commit e25ae0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stage_1/decrypt.go
Expand Up @@ -46,6 +46,7 @@ func main() {

// iterate through each char adding char counts to the map
counts := make(map[string]int)
total_count := 0

for i := 0; i < len(s)-1; i++ {
letter := string(s[i])
Expand All @@ -70,7 +71,9 @@ func main() {
if letter == string(',') {
continue
}
total_count += 1
counts[string(s[i])] += 1
}
fmt.Println(counts)
fmt.Println(total_count)
}

0 comments on commit e25ae0e

Please sign in to comment.