2019年5月26日

摘要: String-->int int a = Integer.parseInt(string); int --> string string str = String.valueOf(int); double --> int double d = 5.0; int i = (int)d; char -- 阅读全文
posted @ 2019-05-26 16:07 thehappyyouth 阅读(109) 评论(0) 推荐(0) 编辑
 

2014年8月24日

摘要: 测试笔试题类型:软件测试| 试题:55道试题(50道选择题,5道问答题)http://bbs.sjtu.edu.cn/bbsanc,path,%2Fgroups%2FGROUP_9%2FJobInfo%2FD7CD26755%2FD85486036%2FM.1131274669.A.htmlhttp... 阅读全文
posted @ 2014-08-24 22:16 thehappyyouth 阅读(794) 评论(0) 推荐(0) 编辑
 

2014年8月21日

摘要: 1.研究范围1)多叉树,图的遍历2)回溯法的解空间树=多叉树的遍历2.研究方法 我们现在研究的是多叉树的遍历,突然想到为什么不能直接用二叉树的遍历方法呢?我们抱着这个问题,先找到多叉树的结构不同于二叉树的地方,然后研究二叉树的遍历,找到其适用范围的限制和多叉树不能采用二叉树遍历的原因,并解决,最后... 阅读全文
posted @ 2014-08-21 13:50 thehappyyouth 阅读(738) 评论(0) 推荐(0) 编辑
 

2014年7月31日

摘要: 1 public int canCompleteCircuit(int[] gas, int[] cost) { 2 int begin=0; 3 int sum=0; 4 int i=0; 5 int n=0; 6 ... 阅读全文
posted @ 2014-07-31 13:54 thehappyyouth 阅读(236) 评论(0) 推荐(0) 编辑
 
摘要: 1 public int singleNumber(int[] A) {2 int s=0;3 for(int i=0;i<A.length;i++){4 s=s^A[i];5 } 6 return... 阅读全文
posted @ 2014-07-31 13:52 thehappyyouth 阅读(135) 评论(0) 推荐(0) 编辑
 
摘要: 1 package leetcode; 2 3 class RandomListNode { 4 int label; 5 RandomListNode next, random; 6 7 public RandomListNode(int x) { 8 ... 阅读全文
posted @ 2014-07-31 13:50 thehappyyouth 阅读(158) 评论(0) 推荐(0) 编辑
 
摘要: 1 public ListNode detectCycle(ListNode head) { 2 ListNode s=head; 3 ListNode f=head; 4 while(f!=null&&f.next!=null){ 5 ... 阅读全文
posted @ 2014-07-31 13:48 thehappyyouth 阅读(137) 评论(0) 推荐(0) 编辑
 
摘要: 1 public boolean hasCycle(ListNode head) { 2 ListNode s=head; 3 ListNode f=head; 4 while(f!=null&&f.next!=null){ 5 ... 阅读全文
posted @ 2014-07-31 13:47 thehappyyouth 阅读(123) 评论(0) 推荐(0) 编辑
 
摘要: 注意:不一定是一分为2 1 package leetcode; 2 3 import java.util.Set; 4 5 public class WordBreak11 { 6 public boolean wordBreak(String s, Set dict) { 7 ... 阅读全文
posted @ 2014-07-31 13:45 thehappyyouth 阅读(171) 评论(0) 推荐(0) 编辑
 

2014年7月30日

摘要: 1 package leetcode; 2 3 public class DetectCycle { 4 public ListNode detectCycle(ListNode head) { 5 ListNode s=head; 6 ListNode ... 阅读全文
posted @ 2014-07-30 17:25 thehappyyouth 阅读(161) 评论(0) 推荐(0) 编辑