This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var libUrl = null; | |
var scriptTag = Array.prototype.slice | |
.call(document.getElementsByTagName("script")) | |
.filter(x => /\?proxy?/.test(x.src)); | |
if (scriptTag.length > 0) { | |
libUrl = scriptTag[0].src.split("m.js")[0]; | |
} else { | |
throw new Error("missing '?proxy' query parameter in your proxy url!"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jernejerin.traffic.helper; | |
import java.util.Comparator; | |
import java.util.PriorityQueue; | |
import java.util.Queue; | |
// Given a stream of unsorted integers, find the median element in sorted order at any given time. | |
// http://www.ardendertat.com/2011/11/03/programming-interview-questions-13-median-of-integer-stream/ | |
public class MedianOfIntegerStream { |