GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — DSAJava/check at master · deepzsenu/DSAJava Expand file tree/ Copy pathcheckMore file actions 123 lines (106 loc) · 3.45 KB / Copy pathcheckFile metadata and controls123 lines (106 loc) · 3.45 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 // // /* package codechef; // don't place package name! */ // // import java.util.*; // // import java.lang.*; // // import java.io.*; // // /* Name of the class has to be "Main" only if the class is public. */ // // class Codechef // // { static HashMap<Long, Long> sortByValue(HashMap<Long, Long> hm) // // { // // // Create a list from elements of HashMap // // List<Map.Entry<Long, Long> > list = // // new LinkedList<Map.Entry<Long, Long> >(hm.entrySet()); // // // Sort the list // // Collections.sort(list, new Comparator<Map.Entry<Long, Long> >() { // // public int compare(Map.Entry<Long, Long> o1, // // Map.Entry<Long, Long> o2) // // { // // return (o1.getValue()).compareTo(o2.getValue()); // // } // // }); // // // put data from sorted list to hashmap // // HashMap<Long, Long> temp = new LinkedHashMap<Long, Long>(); // // for (Map.Entry<Long, Long> aa : list) { // // temp.put(aa.getKey(), aa.getValue()); // // } // // return temp; // // } // // static long minChec(long arr[] , long arr2[], int n ){ // // HashMap<Long, Long> mp = new HashMap<>(); // // for (int i = 0;i<n ;i++ ){ // // if(mp.containsKey(arr[i])){ // // mp.put(arr[i], mp.get(arr[i])+1); // // } // // else{ // // mp.put(arr[i],1); // // } // // } // // for (int i = 0;i<n ;i++ ){ // // if(mp.containsKey(arr2[i])){ // // mp.put(arr2[i], mp.get(arr2[i])+1); // // } // // else{ // // mp.put(arr2[i],1); // // } // // } // // HashMap<, Long> hm = sortByValue(mp); // // for(Long i : hm.keySet()){ // // System.out.print(i+" "); // // } // // return 0; // // } // // public static void main (String[] args) throws java.lang.Exception // // { // // // your code goes here // // Scanner sc = new Scanner(System.in); // // int t = sc.nextInt(); // // while(t>0){ // // int n = sc.nextInt(); // // long arr[] = new long[n]; // // long ar2[] = new long[n]; // // for (int i = 0 ; i <n; i++){ // // arr[i] = sc.nextLong(); // // } // // for (int i = 0 ; i <n; i++){ // // ar2[i] = sc.nextLong(); // // } // // System.out.println(minChec(arr, ar2, n)); // // t--; // // } // // } // // } // /* package codechef; // don't place package name! */ // import java.util.*; // import java.lang.*; // import java.io.*; // /* Name of the class has to be "Main" only if the class is public. */ // class Codechef // { // public static void main (String[] args) throws java.lang.Exception // { // // your code goes here // Scanner sc = new Scanner(System.in); // int t = sc.nextInt(); // while(t>0){ // int x = sc.nextInt(); // int a[] = new int[x]; // int b[] = new int[x]; // for(int i = 0; i <x; i++){ // a[i] = sc.nextInt(); // } // for(int i = 0; i <x; i++){ // b[i] = sc.nextInt(); // } // for(int i = 1; i <x; i++){ // if(a[i]>a[i-1]){ // f = i; // } // else if (a[i] == a[i-1]){ // if (b[i] > b[i-1]){ // f = i; // } // } // } // t--; // } // } // } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |