Solution to Min In Stack from Jobdu

10 Aug

Question (in Chinese): http://ac.jobdu.com/problem.php?pid=1522 Question Name: Min In Stack Question Description: implement a customized stack. It should provide a function min() to return the minimum value in the stack in O(1) time. Input: the input might contain multiple test cases. … Read More »

Solution to Print Matrix from Jobdu

10 Aug

Question (in Chinese): http://ac.jobdu.com/problem.php?pid=1391 Question Name: Print Matrix Question Description: Give an integer matrix, print it in spiral form. Input: the input might contain multiple test cases. Inside each test case, the first line includes two intergers N and M … Read More »