Hackerrank Java Map Solution
Solution in java8
Approach 1.
//Complete this code or write your own from scratch
import java.util.*;
import java.io.*;
class Solution{
public static void main(String []argh)
{
Map<String, Integer> mp = new HashMap<>();
Scanner in = new Scanner(System.in);
int n=in.nextInt();
in.nextLine(