Etiketter » Matrix

On Being Right about Right and Wrong

Andrew Ostrovsky/iStock

by Sam Harris

An Interview with Michael Shermer.

Michael Shermer is the Publisher of Skeptic magazine, a monthly columnist forScientific American, the host of the Skeptics Distinguished Science Lecture Series at Caltech, and a Presidential Fellow at Chapman University. 670 fler ord

Visions

David Icke - "I" Have the Rest of your Data

David Icke cannot see the robot yet.

He is head and shoulders above the masses in his ability to perceive and tolerate truth, but is missing what he is actually talking about. 252 fler ord

In Search Of Truth

Composite Opal (ManMade)

Kata komposit (composite) merupakan kata sifat yang berarti susunan atau gabungan. Komposit berasal dari kata kerja “to compose” yang berarti menyusun atau menggabungkan. Jadi secara sederhana bahan komposit berarti bahan gabungan dari dua atau lebih dari bahan yang berlainan. 546 fler ord

Artikel

Lintcode: Longest Increasing Continuous subsequence II

非常好的DP + DFS题。值得多思考

public class Solution {
    public int longestIncreasingContinuousSubsequenceII(int[][] A) {
        int res = 0;
        if (A == null || A.length == 0 || A[0].length == 0) {
        	return res;
        }
        int[][] store = new int.length];
        for (int i = 0; i < A.length; i++) {
        	for (int j = 0; j < A[0].length; j++) {
        		if (store[i][j] == 0) {
        			res = Math.max(res, dfs(A, store, i, j));
        		}
        	}
        }
        return res;
    }
    private int dfs(int[][] a, int[][] store, int i, int j) {
    	if (store[i][j] != 0) {
    		return store[i][j];
    	}
    	int left = 0, right = 0, up = 0, down = 0;
    	if (j + 1 < a[0].length && a[i] > a[i][j]) {
    		right = dfs(a, store, i, j+1);
    	}
    	if (j > 0 && a[i] > a[i][j]) {
    		left = dfs(a, store, i, j-1);
    	}
    	if (i + 1 < a.length && a[j] > a[i][j]) {
    		down = dfs(a, store, i+1, j);
    	}
    	if (i > 0 && a[j] > a[i][j]) {
    		up = dfs(a, store, i-1, j);
    	}
    	store[i][j] = Math.max(Math.max(up, down), Math.max(left, right)) + 1;
    	return store[i][j];
    }
} 7 fler ord
DP

LISTEN TO: Eminem’s Latest Release in a New Beats By Dre Commercial

In the midst of NBA Playoffs, Beats By Dre taps Golden State Warriors forward and Michigan native Draymond Green for its latest spot which also features a new track from Eminem. 139 fler ord

Matrix

Lil Scrappy Taste Tests 50 Cent's "Effen Vodka"

I can’t say I’ve ever had 50 Cent’s ”Effen Vodka” imported from Holland, so why not go with what my homie Lil Scrappy has to say about it. 18 fler ord

Headlines