My Bad Code
I wrote this code for codechef march 2021 contest for "college life 4" problem but was unsucessfull to solve it Link of the problem here This is for the futute me. Try to solve this problem if you think you are smart import java.util.*; import java.util.stream.*; import java.io.*; class multiMap { long key; long value; multiMap(long key,long value){ this.key = key; this.value = value; } void display(){ System.out.println("key : "+key+"\t value : "+value); } } class MyList{ List keyMapList = new ArrayList (); public MyList(long a , long b,long c,long A,long B,long C){ keyMapList.add(new multiMap(a,A)); keyMapList.add(new multiMap(b,B)); keyMapList.add(new multiMap(c,C)); keyMapList = keyMapList.stream().sorted(Comparator.comparing(e->e.key)).collect(Collectors.toList()); } void pop(){ keyMapList.remove(0); } long getValue(long index){ return keyMapList.get((int)index).value; } long getKey(){ return keyMapList.get...