Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up:Can you ...
分类:
其他好文 时间:
2016-09-12 20:24:26
阅读次数:
132
#include<stdio.h>main(void){ int i=2,n=10; float fac=1; /*¶¨ÒåfacΪµ¥¾«¶ÈÐÍ£¬²¢¸³³õÖµ1*/ if(n==0||n==1) { printf("facorial is 1\n"); return 0; } while ...
分类:
其他好文 时间:
2016-09-12 18:47:14
阅读次数:
124
Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a ...
分类:
其他好文 时间:
2016-09-12 14:17:43
阅读次数:
137
Given an array of integers, find the subarray with smallest sum. Return the sum of the subarray. Notice The subarray should contain one integer at lea ...
分类:
其他好文 时间:
2016-09-12 14:02:29
阅读次数:
152
Givenanarrayofintegers,returnindicesofthetwonumberssuchthattheyadduptoaspecifictarget.Youmayassumethateachinputwouldhaveexactlyonesolution.Example:Givennums=[2,7,11,15],target=9,
Becausenums[0]+nums[1]=2+7=9,
return[0,1].packagehost;
publicclassMain{
//..
分类:
其他好文 时间:
2016-09-12 12:45:03
阅读次数:
118
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists ...
分类:
其他好文 时间:
2016-09-12 12:27:06
阅读次数:
119
一。属性 作用:保护字段,对字段的赋值取值进行限定 意思是在初始化对象的时候防止出现不是事实的违规操作 如将性别赋值为‘中’ 本质:两个方法 get方法和set方法。 public 类型名 属性名 { get{return 字段名;} set{字段名=value;} } get,set属性方法没有存 ...
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space fo ...
分类:
其他好文 时间:
2016-09-12 07:21:13
阅读次数:
139
直接在route.php中写路由 Route ::get( ‘/about’,function(){ return view(‘site.about’); //用“.”来找路劲 }); 在控制器中写路由 要先在route中写路由对应的控制器,再在控制器中写返回的视图 Eg: 在route.php中: ...
分类:
其他好文 时间:
2016-09-12 06:14:50
阅读次数:
160
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: ...
分类:
其他好文 时间:
2016-09-12 00:51:14
阅读次数:
142