摘要:
class Solution { public int[] twoSum(int[] nums, int target) { if(nums == null || nums.length map = new HashMap(); for(int i = 0; i < nums.length; i++){ if(map.cont... 阅读全文
摘要:
/** * 构造方法 * 目标类 */ public class User { private int uid; private String username; private int age; public User(int uid, String username) { this.uid = 阅读全文
摘要:
import java.util.ArrayList; import java.util.Stack; public class Solution { public boolean IsPopOrder(int [] pushA,int [] popA) { Stack stackA = new Stack(); int len = pu... 阅读全文
摘要:
import java.util.Stack; import java.util.Iterator; public class Solution { Stack s = new Stack(); public void push(int node) { s.push(node); } public void pop() { s.pop(); } public int top() { ret... 阅读全文
摘要:
public ArrayList printMatrix(int [][] matrix) { int lenRows = matrix.length;//矩阵的行长 int lenColumn = matrix[0].length;//列长 ArrayList list = new ArrayList(); if(lenR... 阅读全文