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, 22.06.2019 10:50
Write a 3-4 page apa formatted paper comparing your organization’s it strategy with the best practices outlined in your course text. content should include, but not be limited to: developing and delivering on the it value, developing it strategy for the business value and linking it to business metrics. your paper should include an abstract and a conclusion and a reference page with 3-5 references
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
What is outfitting a workplace with video in a technology
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
How many points do i need before i can send a chat
Answers: 1
question
Computers and Technology, 25.06.2019 06:50
Write a program that will askthe user to enter the amount of a purchase. the program should thencompute the state and county sales tax. assume the state sales tax is4 percent and the county sales tax is 2 percent. the program should displaythe amount of the purchase, the state tax, the county sales tax, the total salestax, and the total of the sale. (which is the sum of theamount of purchase plus the total sales tax). hint: use the value 0.02 torepresent 2 percent, and 0.04 to represent 4 percent.
Answers: 2
You know the right answer?
Import java. util. treemap;

public class hw1 {
/**
* inverts an array of st...
Questions
question
Mathematics, 12.07.2019 10:30
Questions on the website: 13722361