摘要: 超时 public class Solution { public int ladderLength(String beginWord, String endWord, List<String> wordList) { //You may assume beginWord and endWord a 阅读全文
posted @ 2017-06-20 09:08 yunyouhua 阅读(115) 评论(0) 推荐(0)
摘要: 2017-6-19 由于师姐程序运行结果图不太好,询问师姐怎么调试。 师姐说可能我电脑配置问题。并给我她的测试图以及结果图。 使用师姐的测试图运行后发现和她的结果一样。 但是我自己的图结果不太好。 师姐的测试图感觉是把图像水平压缩以后,两幅图拼接作为输入。 修改程序pinjietuxiang,修改图 阅读全文
posted @ 2017-06-19 16:11 yunyouhua 阅读(155) 评论(0) 推荐(0)
摘要: public class Solution { /** * @param numCourses a total of n courses * @param prerequisites a list of prerequisite pairs * @return the course order */ 阅读全文
posted @ 2017-06-03 20:27 yunyouhua 阅读(162) 评论(0) 推荐(0)
摘要: /** * Definition for Directed graph. * class DirectedGraphNode { * int label; * ArrayList<DirectedGraphNode> neighbors; * DirectedGraphNode(int x) { l 阅读全文
posted @ 2017-06-03 19:59 yunyouhua 阅读(132) 评论(0) 推荐(0)
摘要: public class Solution { /** * @param A: Given an integer array * @return: void */ public void heapify(int[] A) { // write your code here //push pop to 阅读全文
posted @ 2017-05-07 21:54 yunyouhua 阅读(96) 评论(0) 推荐(0)
摘要: 2017-5-5 https://leetcode.com/problems/valid-parentheses/#/description 题目:Given a string containing just the characters '(', ')', '{', '}', '[' and '] 阅读全文
posted @ 2017-05-05 22:15 yunyouhua 阅读(213) 评论(0) 推荐(0)
摘要: 我写的 /** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val) { * this.val = 阅读全文
posted @ 2017-04-20 22:05 yunyouhua 阅读(235) 评论(0) 推荐(0)
摘要: 我的错误代码 理递归思路 /** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val) { * t 阅读全文
posted @ 2017-04-18 23:04 yunyouhua 阅读(206) 评论(0) 推荐(0)
摘要: 九章答案 // version 1: Divide Conquer public class Solution { /** * @param root the root of the binary tree * @return all root-to-leaf paths */ public Lis 阅读全文
posted @ 2017-04-16 21:58 yunyouhua 阅读(126) 评论(0) 推荐(0)
摘要: 我自己写的divide&conquer /** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val 阅读全文
posted @ 2017-04-16 20:45 yunyouhua 阅读(110) 评论(0) 推荐(0)