MCPcopy Create free account
hub / github.com/Berkeley-CS61B/skeleton-sp23 / letterToNum

Method letterToNum

hw0b/src/MapExercises.java:8–10  ·  view source on GitHub ↗

Returns a map from every lower case letter to the number corresponding to that letter, where 'a' is 1, 'b' is 2, 'c' is 3, ..., 'z' is 26.

()

Source from the content-addressed store, hash-verified

6 * 1, 'b' is 2, 'c' is 3, ..., 'z' is 26.
7 */
8 public static Map<Character, Integer> letterToNum() {
9 return null;
10 }
11
12 /** Returns a map from the integers in the list to their squares. For example, if the input list
13 * is [1, 3, 6, 7], the returned map goes from 1 to 1, 3 to 9, 6 to 36, and 7 to 49.

Callers 1

testLetterToNumMethod · 0.95

Calls

no outgoing calls

Tested by 1

testLetterToNumMethod · 0.76