public static void update(int limit, LinkedList<Integer> timestamps, LinkedList<Integer> values) {
    	while ( !timestamps.isEmpty() && timestamps.getLast() <= limit ) {
    		timestamps.removeLast();
    		values.removeLast();
    	}
    }