码迷,mamicode.com
首页 >  
搜索关键字:two pointer    ( 13796个结果
[leetcode]_Add Two Numbers
题目:两个链表存储数字,然后求和,和值存储在一个链表中。代码: 1 public ListNode addTwoNumbers(ListNode l1, ListNode l2) { 2 ListNode head = new ListNode(0); 3 ListN...
分类:其他好文   时间:2014-06-29 15:15:57    阅读次数:240
LeetCode:Swap Nodes in Pairs
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 ...
分类:其他好文   时间:2014-06-29 14:39:10    阅读次数:268
jsp两种include指令区别
【转】:http://www.cnblogs.com/lazycoding/archive/2011/04/04/two_include.html<%@ include file=”relativeURI”%><jsp:include page=”relativeURI” flush=”true” ...
分类:Web程序   时间:2014-05-29 01:50:53    阅读次数:242
LeetCode --- Add Two Numbers
题目链接说来算是个基础题目,可是还是各种CE,各种WA,基础还是不扎实。附上代码: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *ne...
分类:其他好文   时间:2014-05-28 23:56:38    阅读次数:382
寄存器的英文全称 转载
一、寄存器的英文全称AH&AL=AX(accumulator):累加寄存器 BH&BL=BX(base):基址寄存器 CH&CL=CX(count):计数寄存器 DH&DL=DX(data):数据寄存器 SP(Stack Pointer):堆栈指针寄存器 BP(Base Pointer):基址指针寄...
分类:其他好文   时间:2014-05-28 19:09:52    阅读次数:300
STL之heap
STL的堆操作STL里面的堆操作一般用到的只有4个:make_heap();、pop_heap();、push_heap();、sort_heap();他们的头文件函数是#include 首先是make_heap();他的函数原型是:void make_heap(first_pointer,end_...
分类:其他好文   时间:2014-05-28 02:15:50    阅读次数:291
【LeetCode】Implement strStr()
Implement strStr()Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.标准KMP算法。...
分类:其他好文   时间:2014-05-27 23:41:07    阅读次数:366
【C++深入浅出】智能指针之auto_ptr学习
起:C++98标准加入auto_ptr,即智能指针,C++11加入shared_ptr和weak_ptr两种智能指针,先从auto_ptr的定义学习一下auto_ptr的用法。template class auto_ptr { // wrap an object pointer to ensure....
分类:编程语言   时间:2014-05-27 16:13:40    阅读次数:440
LeetCode: Two Sum 题解
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2014-05-26 19:50:39    阅读次数:314
const char*、char*、char* const、char[]、string的区别
1、const char* p: p is a pointer to const char(char const* p 一样) 意思就是不能通过p指针来修改p指向的内容(但是内容可以修改)。2、char* p : p is a pointer to char 意思就是可通过p指针来修改p指向的内容3...
分类:其他好文   时间:2014-05-26 17:30:58    阅读次数:153
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!