Skip to main content

Posts

Showing posts with the label Day 8: Dictionaries and Maps Hackerrank Solution in Java

Day 8: Dictionaries and Maps Hackerrank Solution in Java

 Day 8: Dictionaries and Maps Hackerrank Solution Java For Explanation: Sample Input 3 sam 99912222 tom 11122222 harry 12299933 sam edward harry Sample Output sam=99912222 Not found harry=12299933 Code: //Complete this code or write your own from scratch import  java.util.*; import  java.io.*; class  Solution{      public   static   void  main(String []argh){         Scanner in =  new  Scanner(System.in);          int  n = in.nextInt();         HashMap<String,Integer> hm =  new  HashMap<>();          for ( int  i =  0 ; i < n; i++){             String name =...