subject

Import java. util. treemap;

public class hw1 {
/**
* inverts an array of strings by returning a treemap that maps strings to the smallest index in the array that contains the string.
*
* @param a an array of strings
* @return a map that given a string returns the smallest index of the array that contains the string
* (or null if string is not in the array a).
*/
public static treemap invert(string[] a) {
//to do
return null;
}

/**
* computes the total number of occurrences of every string in an array.
*
* @param a an array of strings
* @return a map that given a string returns the number of occurrences of that string in the array
* (or null if string is not in the array a).
*/
public static treemap count(string[] a) {
// todo
return null;
}
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:30
What is the difference between the internet and the world wide web?
Answers: 1
question
Computers and Technology, 24.06.2019 07:20
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience.ob. add presenter's notes to each slide.oc. add a video to each slide.od. save her slide presentation to a flash drive
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Each row in a database is a set of unique information called a(n) ? a.) table. b.) record. c.) object. d.) field.
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Append and make table queries are called queries. select complex simple action i think action
Answers: 1
You know the right answer?
Import java. util. treemap;

public class hw1 {
/**
* inverts an array of st...
Questions
question
Physics, 18.11.2019 23:31
question
Mathematics, 18.11.2019 23:31
question
Mathematics, 18.11.2019 23:31
question
Mathematics, 18.11.2019 23:31