Given an array of integers, every element 
appears twice except for one. Find that single one. Note: Your algorithm should 
have a linear runtime comple...
                            
                            
                                分类:
其他好文   时间:
2014-05-23 07:22:48   
                                阅读次数:
241
                             
                         
                    
                        
                            
                            
                                Given an array of integers, every element 
appearstwiceexcept for one. Find that single one.Note:Your algorithm should have 
a linear runtime complexity...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 16:31:03   
                                阅读次数:
194
                             
                         
                    
                        
                            
                            
                                【题目】
原文:
2.2 Implement an algorithm to find the nth to last element of a singly linked list.
译文:
实现一个算法从一个单链表中返回倒数第n个元素。
【分析】
【思路一】
(1)创建两个指针p1和p2,指向单链表的开始节点。
(2)使p2移动n-1个位置,使之指向从头...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 09:03:53   
                                阅读次数:
315
                             
                         
                    
                        
                            
                            
                                删除
删除操作非常简单,直接在结果集后链式调用remove()方法即可。
例如,要删除以下html脚本中所有的a元素,直接通过
$('a'.remove();
就可以做到了。
	Anchors
	Anchor Element
	Anchor Element
	Anchor Element
当然也可以通过向remove传参的形式来过滤选择结果,然后再执行remove操作。
$(...
                            
                            
                                分类:
Web程序   时间:
2014-05-22 07:59:07   
                                阅读次数:
298
                             
                         
                    
                        
                            
                            
                                Ext使用了三个核心的工具类对我们掌握的DOM进行了完美的封装。 ┣ 
Ext.Element(几乎对DOM的一切进行了封彻底装) ┣ Ext.DomHelper(一个强大的操控UI界面的工具类) ┣ 
Ext.DomQuery(用来进行DOM节点查询)Ext.Element常用的方法: ┣ E...
                            
                            
                                分类:
Web程序   时间:
2014-05-22 00:55:39   
                                阅读次数:
315
                             
                         
                    
                        
                            
                            
                                Given a sorted array, remove the duplicates in 
place such that each element appear onlyonceand return the new length.Do not 
allocate extra space for a...
                            
                            
                                分类:
其他好文   时间:
2014-05-21 20:00:51   
                                阅读次数:
296
                             
                         
                    
                        
                            
                            
                                Html DOM Ext Element ComponentComponent 最高层Html DOM 
最基础Ext.getCmp 是 Ext.ComponentMgr.get 的简称 获取 ComponentExt.get 是 Ext.Element.get 
的简称 获取Ext Element.....
                            
                            
                                分类:
其他好文   时间:
2014-05-21 17:26:40   
                                阅读次数:
258
                             
                         
                    
                        
                            
                            
                                Microsoft.Maps.Events.addHandler(map, "mousemove", function (e) {
  // get the HTML DOM Element that represents the Map
  var mapElem = map.getRootElement();
  if (e.targetType === "map") {
    // Mou...
                            
                            
                                分类:
其他好文   时间:
2014-05-21 10:47:53   
                                阅读次数:
253
                             
                         
                    
                        
                            
                            
                                Given an array of non-negative integers, you 
are initially positioned at the first index of the array.Each element in the 
array represents your maximu...
                            
                            
                                分类:
其他好文   时间:
2014-05-21 04:39:53   
                                阅读次数:
332
                             
                         
                    
                        
                            
                            
                                package merge;
import javax.lang.model.element.Element;
/**
 * 归并排序:
 * 归并排序的效率是比较高的,设数列长为N,将数列分开成小数列一共需要logN步,每步都是一个合并有序数列的过程,时间复杂度为O(N),故一共为
 * O(NlogN).
 * @author AbuGe
 *
 */
public class Merge...
                            
                            
                                分类:
其他好文   时间:
2014-05-20 14:40:39   
                                阅读次数:
320