题目:
Remove all elements from a linked list of integers that have value val.
Example
Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6
Return: 1 --> 2 --> 3 --> 4 --> 5
Credits:
Special...
分类:
其他好文 时间:
2015-05-19 22:45:51
阅读次数:
194
这道题,将链表从前往后遍历,将前面遍历过的结点放入set中,依次往后,判断是否指向set中的结点即可#include#includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int ...
分类:
其他好文 时间:
2015-05-19 22:26:55
阅读次数:
207
javascript原生写法: Array.prototype.indexOf = function(val){ for(var i=0;i-1){ rerurn this.splice(index,1); }}var dd=['s','d','a','d']dd.remove('s'...
分类:
编程语言 时间:
2015-05-19 22:26:36
阅读次数:
274
//一键正常functionbenSetState(){$(function(){$('input[type=radio]').each(function(){if($(this).val()=="1"){$(this).attr('checked','true');}})})}正常损毁
分类:
Web程序 时间:
2015-05-19 22:08:19
阅读次数:
153
题目:Reverse a singly linked list
C代码:
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* struct ListNode *next;
* };
*/
struct ListNode* reverseList(struct List...
分类:
其他好文 时间:
2015-05-19 20:57:20
阅读次数:
128
/**CreatedonJan29,2015***/packagecom.zcd.test;importjava.sql.Timestamp;publicclassTest{privateintx;privatestaticintstaticX;publicvoidstackAccess(intval){intj=0;for(inti=0;i<val;i++){j+=1;}}publicvoidinstanceAccess(intval){for(inti=0;i<val;i++){x+=1;}}..
分类:
编程语言 时间:
2015-05-19 16:55:11
阅读次数:
152
//live 后绑定事件(动态的生成后获取生成的对象)
$("#table1 tr[name='name111']").live("click", function() {
//这个tr的value值等于空则把这个tr加上背景并且把隐藏域的value值改为tr的ID值
if ($(this).next().val() == ''...
分类:
其他好文 时间:
2015-05-19 16:45:19
阅读次数:
160
$("#email").blur("blur",function(){varemail=$("#email").val();varRegex=/^([\.a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;if($("#email").val()==""){$("#email_text").html("邮箱信息不能为空");}else{if(Regex.test(email)){$("#email_text").html("");}else{$..
分类:
Web程序 时间:
2015-05-19 15:00:41
阅读次数:
144
$("#email").blur("blur",function(){varemail=$("#email").val();varRegex=/^([\.a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;if($("#email").val()==""){$("#email_text").html("邮箱信息不能为空");}else{if(Regex.test(email)){$("#email_text").html("");}else{$..
分类:
Web程序 时间:
2015-05-19 14:59:12
阅读次数:
130
//个人身份证function checkEnergyCard(self){ var allowancePersonValue= $(self).val(); //是否为空 if(allowancePersonValue==""){ MS.messShow("身份证不能为空"); return .....
分类:
其他好文 时间:
2015-05-19 10:23:21
阅读次数:
148