1 public class Solution { 2 public int
lengthOfLongestSubstring(String s) { 3 int length = s.length(); 4 if (length ==
0) return ...
分类:
其他好文 时间:
2014-06-13 08:31:32
阅读次数:
214
原题地址:https://oj.leetcode.com/problems/multiply-strings/题意:Given
two numbers represented as strings, return multiplication of the numbers as a
string.N...
分类:
编程语言 时间:
2014-06-12 21:43:03
阅读次数:
344
1.前台调用后台方法//前台代码//后台代码public string
GetStr()//GetStr()须有返回值,public可换成protect,但不能是private{ string s = "Hello World!";
return s;}2.后台调用前台函数//前台代码/...
分类:
Web程序 时间:
2014-06-12 19:41:39
阅读次数:
276
mWebView.setWebViewClient(newWebViewClient(){publicbooleanshouldOverrideUrlLoading(WebViewview,Stringurl){view.loadUrl(url);returntrue;}});假如不做任何处置,阅读页面,点击体系“Back”键,整个Browser会调用finish()而结束本身,假如期望阅读的网页回退而不是推出..
分类:
移动开发 时间:
2014-06-10 23:50:27
阅读次数:
625
问题:jquery中使用submit提交按钮时,当returnfalse后,依然会提交表单.解决:使用button按钮,而不是submit按钮<scripttype="text/javascript"src="scripts/jquery-2.0.2.js"></script><scripttype="text/javascript">functioncheck(){varnpassword=$("#npas..
分类:
Web程序 时间:
2014-06-10 23:00:36
阅读次数:
432
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
中...
分类:
其他好文 时间:
2014-06-10 18:41:04
阅读次数:
191
题目
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.
方法
有序链表,合并成一个有序链表。
public ListNod...
分类:
其他好文 时间:
2014-06-10 18:13:11
阅读次数:
241
题目
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
方法
从后往前,每个字符进行判断。
public String addBinary(String a, String...
分类:
其他好文 时间:
2014-06-10 17:50:48
阅读次数:
241
问题:对链表进行排序,要求时间复杂度为NlogN。归并排序。
inline ListNode* getMidle(ListNode *head){
if(NULL == head || NULL == head->next)
return head;
ListNode *pslow = head;
ListNode *pfast = head;
while (pfast->next...
分类:
其他好文 时间:
2014-06-10 17:35:56
阅读次数:
282
原题地址:https://oj.leetcode.com/problems/letter-combinations-of-a-phone-number/题意:Given
a digit string, return all possible letter combinations that the ...
分类:
编程语言 时间:
2014-06-10 16:40:57
阅读次数:
223