一:题目:给定单向链表的头指针和一个结点指针,定义一个函数在O(1)时间删除该结点。链表结点与函数的定义如下:
struct ListNode
{
int m_nValue;
ListNode* m_pNext;
};
void delete_note(ListNode *head,ListNode *current)
{
// 空的
if(head == null || ...
分类:
编程语言 时间:
2014-10-28 00:53:32
阅读次数:
180
Insert or update an element in mapm:m[key] = elemRetrieve an element:elem = m[key]Delete an element:delete(m, key)Test that a key is present with a tw...
分类:
其他好文 时间:
2014-10-28 00:39:53
阅读次数:
243
--演示隐式游标,系统自动声明,自动打开,自动使用并且自动关闭begin update emp set sal = 1000; dbms_output.put_line('影响的行数:' || sql%rowcount);end; rollback; /*游标的使用方法:第一步:声明游标第二步:打开...
分类:
数据库 时间:
2014-10-28 00:34:19
阅读次数:
245
--create or replace 创建或替换,如果存在就替换,不存在就创建create or replace procedure pis cursor c is select * from dept2 for update;begin for row_record in c loop if (...
分类:
数据库 时间:
2014-10-28 00:29:31
阅读次数:
268
向mysql 插入数据时 很多时候 我们想知 道刚刚插入数据的id 这对我们很有用 下面我说出常用的三种 方法并一一分析其利与弊 一 用以下语句: mysql_query("select max(id) from t1",$link); 使用这种方法时 我们得...
分类:
Web程序 时间:
2014-10-27 23:14:09
阅读次数:
423
sudo bash :change the current user into rootsu u1:change the current user into u1useradd: add new user into systemuserdel: delete a user from systemgr...
分类:
其他好文 时间:
2014-10-27 22:59:09
阅读次数:
221
DELETE删除多表数据,怎样才能同时删除多个关联表的数据呢?这里做了深入的解释:1、 delete from t1 where 条件2、delete t1 from t1 where 条件3、 delete t1 from t1,t2 where 条件4、delete t1,t2 from t.....
分类:
其他好文 时间:
2014-10-27 22:54:12
阅读次数:
175
Since these files are hidden you will have to do anls -ato list them. If you don't have one you can create one.Update:If I remember correctly, when I ...
分类:
系统相关 时间:
2014-10-27 22:44:09
阅读次数:
353
ubuntu 下如何安装wine 1、sudo add-apt-repository ppa:ubuntu-wine/ppa 2、sudo apt-get update 3、sudo apt-get install wine1.7 添加软件源,运行安装wine 安装完成后,就可以运行window下的应用程序了,若在...
XrmServiceToolkit - A Microsoft Dynamics CRM 2011 & CRM 2013 JavaScript Libraryhttp://xrmservicetoolkit.codeplex.com/documentation特殊用法Create 和 Update{...
分类:
编程语言 时间:
2014-10-27 21:14:41
阅读次数:
191