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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:50, edenlbarfield
Which are steps taken to diagnose a computer problem? a) reproducing the problem and using error codes b) reproducing the problem and troubleshooting c) using error codes and troubleshooting d) using error codes and stepping functions
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, BIKRAMlawati5544
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
image
Computers and Technology, 24.06.2019 02:30, Esmail
Write the pseudo code for this problem based on what you learned from the video. the purpose is to design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to miles. the conversion formula is as follows: miles = kilometers x 0.6214
Answers: 3
image
Computers and Technology, 24.06.2019 12:50, neptunesx
Write a new lc-3 trap subroutine (i. e. a subroutine that will be invoked via the trap instruction) that will receive a numeric digit entered at the keyboard (i. e. an ascii character), echo it to the screen, and return in r0 the corresponding numeric value: so if the user types the digit '7', the character '7' will appear on the screen, but the value returned in r0 will be b0000 0000 0000 0111 (#7) you may not use any trap calls in your code - you must implement the "polling" code that interrogates the keyboard status and data registers. ; getnum_tsr ; a subroutine for obtaining a numeric value ; given ascii numeric digit input to keyboard. ; the numeric digit is echoed to the console (e. g. '7' = b0000 0000 0011 0111), ; but the value returned in r0 is the actual numeric value ; corresponding to the digit (e. g. b0000 0000 0000 0111 =
Answers: 3
You know the right answer?
Import java. util. treemap;

public class hw1 {
/**
* inverts an array of st...

Questions in other subjects:

Konu
Mathematics, 13.09.2020 05:01
Konu
Mathematics, 13.09.2020 05:01
Konu
History, 13.09.2020 05:01
Konu
Mathematics, 13.09.2020 05:01
Konu
Biology, 13.09.2020 05:01
Konu
Biology, 13.09.2020 05:01
Konu
Mathematics, 13.09.2020 05:01
Konu
Mathematics, 13.09.2020 05:01
Konu
Mathematics, 13.09.2020 05:01