05 2016 档案

摘要:Binary Tree Postorder Traversal My Submissions QuestionEditorial Solution Total Accepted: 97358 Total Submissions: 273744 Difficulty: Hard Given a bin 阅读全文
posted @ 2016-05-11 16:33 Free_Open 阅读(229) 评论(0) 推荐(0) 编辑
摘要:Gray Code My Submissions QuestionEditorial Solution Total Accepted: 60277 Total Submissions: 165212 Difficulty: Medium The gray code is a b... 阅读全文
posted @ 2016-05-11 12:12 Free_Open 阅读(204) 评论(0) 推荐(0) 编辑
摘要:Reorder List My Submissions QuestionEditorial Solution Total Accepted: 64392 Total Submissions: 281830 Difficulty: Medium Given a singly li... 阅读全文
posted @ 2016-05-10 22:35 Free_Open 阅读(221) 评论(0) 推荐(0) 编辑
摘要:Binary Tree Zigzag Level Order Traversal My Submissions QuestionEditorial Solution Total Accepted: 60410 Total Submissions: 210160 Difficul... 阅读全文
posted @ 2016-05-10 21:13 Free_Open 阅读(228) 评论(0) 推荐(0) 编辑
摘要:IP聚合 Accepts: 138  Submissions: 293  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others) Problem Descriptio... 阅读全文
posted @ 2016-05-09 21:06 Free_Open 阅读(297) 评论(0) 推荐(0) 编辑
摘要:这是自己用stl实现的一些字符串处理函数和常用的字符串处理技巧,经验正基本无误,可直接使用,若有问题,可相应列出 包括:split string to int int to string join#include #in... 阅读全文
posted @ 2016-05-09 15:26 Free_Open 阅读(6083) 评论(0) 推荐(0) 编辑
摘要:96. Unique Binary Search Trees My Submissions Question Editorial Solution Total Accepted: 82788 Total Submissions: 220611 Difficulty: ... 阅读全文
posted @ 2016-05-09 12:10 Free_Open 阅读(155) 评论(0) 推荐(0) 编辑
摘要:问题:给定一个有序序列1~n,要你将其完全打乱,要求每个元素在任何一个位置出现的概率均为1/n。 解决方案:依次遍历数组,对第n个元素,以1/n的概率与前n个元素中的某个元素互换位置,最后生成的序列即满足要求,1/n的概率可通过rand() % n实现。见如下程序: void swap(int*... 阅读全文
posted @ 2016-05-08 18:31 Free_Open 阅读(334) 评论(0) 推荐(1) 编辑
摘要:Binary Tree Level Order Traversal II My Submissions QuestionEditorial Solution Total Accepted: 79742 Total Submissions: 234887 Difficulty: ... 阅读全文
posted @ 2016-05-08 18:25 Free_Open 阅读(286) 评论(0) 推荐(0) 编辑
摘要:Binary Tree Level Order Traversal My Submissions QuestionEditorial Solution Total Accepted: 102531 Total Submissions: 312211 Difficulty: Easy Given a 阅读全文
posted @ 2016-05-08 16:16 Free_Open 阅读(218) 评论(0) 推荐(0) 编辑
摘要:Binary Tree Inorder Traversal My Submissions QuestionEditorial Solution Total Accepted: 123484 Total Submissions: 310732 Difficulty: Medium... 阅读全文
posted @ 2016-05-08 12:39 Free_Open 阅读(121) 评论(0) 推荐(0) 编辑
摘要:Lowest Common Ancestor of a Binary Search Tree My Submissions QuestionEditorial Solution Total Accepted: 68335 Total Submissions: 181124 Di... 阅读全文
posted @ 2016-05-06 22:13 Free_Open 阅读(169) 评论(0) 推荐(0) 编辑
摘要:Divide Two Integers My Submissions QuestionEditorial Solution Total Accepted: 66073 Total Submissions: 421509 Difficulty: Medium Divide two... 阅读全文
posted @ 2016-05-05 23:31 Free_Open 阅读(109) 评论(0) 推荐(0) 编辑
摘要:用过linux的都知道,在linux下编译链接程序,如果不加-o参数,生成的binary代码的名字都是默认的a.out。一不小心,a.out还会覆盖上次其他code生成的binary代码。 a.out是"assembler output"的缩写格式,代表汇编程序输出。在较早版本的类unix系... 阅读全文
posted @ 2016-05-05 13:23 Free_Open 阅读(312) 评论(0) 推荐(0) 编辑
摘要:深入理解操作系统中有个csapp.h的头文件 以下来介绍下如何使用它: 该头文件下载地址为http://download.csdn.net/detail/tzasd89812/4206284 在Ubuntu下如何使用: 1. 将此文件移到/usr/include中, sudo mv c... 阅读全文
posted @ 2016-05-05 13:06 Free_Open 阅读(297) 评论(0) 推荐(0) 编辑
摘要:GCC参数详解 gcc是gnu compiler collection 的简称,他包含了多种语言的编译器,如C, C++, Objective-C, Objective-C++, Java, Fortran和Ada。但每种编译器的名字不一样,gcc and g++ 分别是 gnu 的 c ... 阅读全文
posted @ 2016-05-05 12:21 Free_Open 阅读(453) 评论(0) 推荐(0) 编辑
摘要:linux上使用netstat察看mysql端口和连接 linux上使用netstat察看mysql端口和连接 近日发现写的一个java程序的数据库连接在大压力下工作不打正常,因此研究了一下dbcp,中间为了查看mysql服务器的数据库连接情况,需要使用netstat来查看端口和连接, 将使... 阅读全文
posted @ 2016-05-05 12:00 Free_Open 阅读(2055) 评论(0) 推荐(0) 编辑
摘要:1. sudo apt-get install apcher2 2.sudo apt-get install php5 3.sudo apt-get install mysql-server 4.sudo apt-get install phpmyadmin 5.配置https:... 阅读全文
posted @ 2016-05-04 21:27 Free_Open 阅读(130) 评论(0) 推荐(0) 编辑
摘要:Odd Even Linked List My Submissions QuestionEditorial Solution Total Accepted: 29496 Total Submissions: 77710 Difficulty: Medium Given a si... 阅读全文
posted @ 2016-05-04 12:36 Free_Open 阅读(117) 评论(0) 推荐(0) 编辑
摘要:Palindrome Linked List My Submissions QuestionEditorial Solution Total Accepted: 46990 Total Submissions: 166743 Difficulty: Easy Given a s... 阅读全文
posted @ 2016-05-04 11:25 Free_Open 阅读(130) 评论(0) 推荐(0) 编辑
摘要:Remove Linked List Elements My Submissions QuestionEditorial Solution Total Accepted: 61924 Total Submissions: 215788 Difficulty: Easy Remo... 阅读全文
posted @ 2016-05-04 10:51 Free_Open 阅读(148) 评论(0) 推荐(0) 编辑
摘要:Binary Tree Preorder Traversal My Submissions QuestionEditorial Solution Total Accepted: 119655 Total Submissions: 300079 Difficulty: Mediu... 阅读全文
posted @ 2016-05-03 22:58 Free_Open 阅读(86) 评论(0) 推荐(0) 编辑
摘要:Flatten Binary Tree to Linked List My Submissions QuestionEditorial Solution Total Accepted: 81373 Total Submissions: 261933 Difficulty: Me... 阅读全文
posted @ 2016-05-03 22:43 Free_Open 阅读(98) 评论(0) 推荐(0) 编辑
摘要:最近在腾讯,百度等的面试中被问到了上面某个或几个问题,我这人一碰到笔试面试什么鬼的就是紧张,然后就乱说话,其实很多东西我知道,只是表达不清,也许自己没有去整理,所以其实大脑中概念不清晰,今天梳理一下,用自己的语言来描述下这些概念: 1.野指针 比如说吧: int main()... 阅读全文
posted @ 2016-05-03 22:03 Free_Open 阅读(1009) 评论(0) 推荐(0) 编辑
摘要:数组指针和指针数组的区别 数组指针(也称行指针) 定义 int (*p)[n]; ()优先级高,首先说明p是一个指针,指向一个整型的一维数组,这个一维数组的长度是n,也可以说是p的步长。也就是说执行p+1时,p要跨过n个整型数据的长度。 如要将二维数组赋给一指针,应这样赋值: int... 阅读全文
posted @ 2016-05-03 21:14 Free_Open 阅读(367) 评论(0) 推荐(0) 编辑
摘要:Linked List Cycle II My Submissions QuestionEditorial Solution Total Accepted: 74093 Total Submissions: 235430 Difficulty: Medium Given a l... 阅读全文
posted @ 2016-05-03 20:51 Free_Open 阅读(110) 评论(0) 推荐(0) 编辑
摘要:Linked List Cycle My Submissions QuestionEditorial Solution Total Accepted: 102785 Total Submissions: 278248 Difficulty: Easy Given a linke... 阅读全文
posted @ 2016-05-03 20:08 Free_Open 阅读(105) 评论(0) 推荐(0) 编辑
摘要:Intersection of Two Linked Lists My Submissions QuestionEditorial Solution Total Accepted: 72580 Total Submissions: 239762 Difficulty: Easy... 阅读全文
posted @ 2016-05-03 19:38 Free_Open 阅读(130) 评论(0) 推荐(0) 编辑
摘要:一. 文件(文件夹)的权限问题 一个文件或者文件夹,使用它的人有三类:root、当前用户和其他用户,例如,我们可以通过 ls -l xxx.xxx 来查看文件 “xxx.xxx” 的权限,比如我查看 /var/log/ 中的 boot.log 文件的权限:ls -l /var/log/... 阅读全文
posted @ 2016-05-03 09:47 Free_Open 阅读(758) 评论(0) 推荐(0) 编辑
摘要:Plus One My Submissions QuestionEditorial Solution Total Accepted: 98403 Total Submissions: 292594 Difficulty: Easy Given a non-negative nu... 阅读全文
posted @ 2016-05-02 16:38 Free_Open 阅读(148) 评论(0) 推荐(0) 编辑
摘要:Reverse Linked List II My Submissions QuestionEditorial Solution Total Accepted: 70579 Total Submissions: 252986 Difficulty: Medium Reverse a linked l 阅读全文
posted @ 2016-05-02 15:56 Free_Open 阅读(109) 评论(0) 推荐(0) 编辑
摘要:$88. Merge Sorted Array My Submissions QuestionEditorial Solution Total Accepted: 98885 Total Submissions: 329052 Difficulty: Easy Given tw... 阅读全文
posted @ 2016-05-02 15:22 Free_Open 阅读(148) 评论(0) 推荐(0) 编辑
摘要:Generate Parentheses My Submissions QuestionEditorial Solution Total Accepted: 86957 Total Submissions: 234754 Difficulty: Medium Given n p... 阅读全文
posted @ 2016-05-02 13:28 Free_Open 阅读(100) 评论(0) 推荐(0) 编辑
摘要:Valid Parentheses My Submissions QuestionEditorial Solution Total Accepted: 106346 Total Submissions: 361674 Difficulty: Easy Given a strin... 阅读全文
posted @ 2016-05-02 12:32 Free_Open 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Letter Combinations of a Phone Number My Submissions QuestionEditorial Solution Total Accepted: 78554 Total Submissions: 273286 Difficulty:... 阅读全文
posted @ 2016-05-02 11:45 Free_Open 阅读(126) 评论(0) 推荐(0) 编辑
摘要:Count and Say My Submissions QuestionEditorial Solution Total Accepted: 79863 Total Submissions: 275285 Difficulty: Easy The count-and-say ... 阅读全文
posted @ 2016-05-02 10:57 Free_Open 阅读(123) 评论(0) 推荐(0) 编辑
摘要:Reverse Nodes in k-Group My Submissions QuestionEditorial Solution Total Accepted: 58690 Total Submissions: 212820 Difficulty: Hard Given a... 阅读全文
posted @ 2016-05-01 22:44 Free_Open 阅读(142) 评论(0) 推荐(0) 编辑
摘要:Remove Nth Node From End of List My Submissions QuestionEditorial Solution Total Accepted: 106592 Total Submissions: 361392 Difficulty: Eas... 阅读全文
posted @ 2016-05-01 13:38 Free_Open 阅读(109) 评论(0) 推荐(0) 编辑
摘要:操作系统后门学习—Windows篇 0×00 准备工作 假设用户以管理员权限登录系统,在Windows 7系统上使用netcat 创建一个后门。 Netcat 功能比较单一, 缺少了许多我们渗透工作中需要的功能。为此我们将创建一个便携式的工具包来解决这个问题 : 1.下载额外的文件和附加... 阅读全文
posted @ 2016-05-01 12:59 Free_Open 阅读(1382) 评论(0) 推荐(0) 编辑
摘要:Climbing Stairs My Submissions QuestionEditorial Solution Total Accepted: 106498 Total Submissions: 290003 Difficulty: Easy You are climbin... 阅读全文
posted @ 2016-05-01 12:30 Free_Open 阅读(153) 评论(0) 推荐(0) 编辑
摘要:什么是异或? Wikipedia的解释: 在逻辑学中,逻辑算符异或(exclusive or)是对两个运算元的一种逻辑析取类型,符号为 XOR 或 EOR 或 ⊕(编程语言中常用^)。但与一般的逻辑或不同,异或算符的值为真仅当两个运算元中恰有一个的值为真,而另外一个的值为非真。转化为命题,就是... 阅读全文
posted @ 2016-05-01 12:02 Free_Open 阅读(2033) 评论(0) 推荐(1) 编辑
摘要:3Sum Closest My Submissions QuestionEditorial Solution Total Accepted: 76185 Total Submissions: 262100 Difficulty: Medium Given an array S ... 阅读全文
posted @ 2016-05-01 11:08 Free_Open 阅读(108) 评论(0) 推荐(0) 编辑
摘要:Remove Duplicates from Sorted Array My Submissions QuestionEditorial Solution Total Accepted: 127836 Total Submissions: 381794 Difficulty: ... 阅读全文
posted @ 2016-05-01 10:33 Free_Open 阅读(97) 评论(0) 推荐(0) 编辑
摘要:由AI大作业想到的近几年《人工智能导论》的大作业是编写一个博弈程序,这类程序的典型框架就是α-β剪枝算法,像著名的打败了国际象棋大师卡斯帕罗的深蓝,就是这么干的,一些中国象棋程序也是这样的框架。大多数同学在完成大作业时,也基本选择的是这个框架,也刚好与上课内容一致。 然后这个在国际... 阅读全文
posted @ 2016-05-01 10:18 Free_Open 阅读(198) 评论(0) 推荐(0) 编辑
摘要:Majority Element My Submissions QuestionEditorial Solution Total Accepted: 110538 Total Submissions: 268290 Difficulty: Easy Given an array... 阅读全文
posted @ 2016-05-01 00:01 Free_Open 阅读(99) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示