摘要:
超时 public class Solution { public int ladderLength(String beginWord, String endWord, List<String> wordList) { //You may assume beginWord and endWord a 阅读全文
摘要:
public class Solution { /** * @param numCourses a total of n courses * @param prerequisites a list of prerequisite pairs * @return the course order */ 阅读全文
摘要:
public class Solution { /** * @param A: Given an integer array * @return: void */ public void heapify(int[] A) { // write your code here //push pop to 阅读全文
摘要:
2017-5-5 https://leetcode.com/problems/valid-parentheses/#/description 题目:Given a string containing just the characters '(', ')', '{', '}', '[' and '] 阅读全文
摘要:
我写的 /** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val) { * this.val = 阅读全文
摘要:
我的错误代码 理递归思路 /** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val) { * t 阅读全文
摘要:
九章答案 // version 1: Divide Conquer public class Solution { /** * @param root the root of the binary tree * @return all root-to-leaf paths */ public Lis 阅读全文
摘要:
我自己写的divide&conquer /** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val 阅读全文