We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lab 3 - Letter frequency
Write a function that returns a mapping of each letter to its frequency: func letters(s string) map[rune]int
func letters(s string) map[rune]int
Write a function that returns a sorted slice of strings with elements "{key}:{val}". Use package sort: func sortLetters(m map[rune]int) []string
func sortLetters(m map[rune]int) []string
Call fmt.Println(strings.Join(sortLetters(letters("aba")), "\n")) in main to print: a:2 b:1 Bonus points: comprehensive tests
fmt.Println(strings.Join(sortLetters(letters("aba")), "\n"))
main
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Lab 3 - Letter frequency
Write a function that returns a mapping of each letter to its frequency:
func letters(s string) map[rune]int
Write a function that returns a sorted slice of strings with elements "{key}:{val}". Use package sort:
func sortLetters(m map[rune]int) []string
Call
fmt.Println(strings.Join(sortLetters(letters("aba")), "\n"))
inmain
to print:a:2
b:1
Bonus points: comprehensive tests
The text was updated successfully, but these errors were encountered: