List<String> topKURL(List<String> urls, int k) {
		Map<String, Integer> count=new HashMap<>();
		for (String s:urls) {
			Integer c=count.get(s);
			int newc=(c==null?1:(c+1));
			count.put(s, newc);
		}
		PriorityQueue<Entry<String, Integer>> pq=new PriorityQueue<>(k, new Comparator<Entry<String,Integer>>(){
			@Override
			public int compare(Entry<String, Integer>o1, Entry<String,Integer>o2) {
				return o1.getValue()-o2.getValue();
			}
		});
		for (Entry<String, Integer>e:count.entrySet()) {
			if (pq.size()<k) pq.offer(e);
			else if (pq.peek().getValue()<e.getValue()) {
				pq.poll();pq.offer(e);
			}
		}
		List<String> rel=new ArrayList<>();
		for (Entry<String, Integer>e:pq) {
			rel.add(e.getKey());
		}
		return rel;
	}