abc_begin

导航

2017年10月14日 #

PILE读书笔记_文件I/O

摘要: open函数 参数说明: (1)pathname: 表示要打开的文件路径 (2)flags: 用于指示打开文件的选项,常用的有O_RDONLY、 O_WRONLY和O_RDWR,还有一些选项如下: O_APPEND: 每次进行写操作时, 内核都会先定位到文件尾, 再执行写操作 O_ASYNC: 使用 阅读全文

posted @ 2017-10-14 23:07 LastBattle 阅读(438) 评论(0) 推荐(0) 编辑

PILE读书笔记_基础知识

摘要: 程序的构成 Linux下二进制可执行程序的格式一般为ELF格式。 我们可以用readelf命令来读取二进制的信息。 ELF文件的主要内容就是由各个section及symbol表组成的。 下面来分别介绍这些字段的含义: .text:已编译程序的机器代码,为代码段, 用于保存可执行指令 。 .rodat 阅读全文

posted @ 2017-10-14 21:55 LastBattle 阅读(271) 评论(0) 推荐(0) 编辑

2. Add Two Numbers【medium】

摘要: 2. Add Two Numbers【medium】 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and 阅读全文

posted @ 2017-10-14 19:33 LastBattle 阅读(169) 评论(0) 推荐(0) 编辑

160. Intersection of Two Linked Lists【easy】

摘要: 160. Intersection of Two Linked Lists【easy】 Write a program to find the node at which the intersection of two singly linked lists begins. For example, 阅读全文

posted @ 2017-10-14 18:58 LastBattle 阅读(205) 评论(0) 推荐(0) 编辑

92. Reverse Linked List II【Medium】

摘要: 92. Reverse Linked List II【Medium】 Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL,  阅读全文

posted @ 2017-10-14 18:49 LastBattle 阅读(183) 评论(0) 推荐(0) 编辑

206. Reverse Linked List【easy】

摘要: 206. Reverse Linked List【easy】 Reverse a singly linked list. Hint: A linked list can be reversed either iteratively or recursively. Could you implemen 阅读全文

posted @ 2017-10-14 17:14 LastBattle 阅读(198) 评论(0) 推荐(0) 编辑

203. Remove Linked List Elements【easy】

摘要: 203. Remove Linked List Elements【easy】 Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 阅读全文

posted @ 2017-10-14 16:18 LastBattle 阅读(190) 评论(0) 推荐(0) 编辑

82. Remove Duplicates from Sorted List II【Medium】

摘要: 82. Remove Duplicates from Sorted List II【Medium】 Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numb 阅读全文

posted @ 2017-10-14 15:47 LastBattle 阅读(142) 评论(0) 推荐(0) 编辑

83. Remove Duplicates from Sorted List【easy】

摘要: 83. Remove Duplicates from Sorted List【easy】 Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Gi 阅读全文

posted @ 2017-10-14 13:27 LastBattle 阅读(191) 评论(0) 推荐(0) 编辑

21. Merge Two Sorted Lists【easy】

摘要: 21. Merge Two Sorted Lists【easy】 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes 阅读全文

posted @ 2017-10-14 13:06 LastBattle 阅读(158) 评论(0) 推荐(0) 编辑

142. Linked List Cycle II【easy】

摘要: 142. Linked List Cycle II【easy】 Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify th 阅读全文

posted @ 2017-10-14 12:29 LastBattle 阅读(481) 评论(1) 推荐(0) 编辑

141. Linked List Cycle【easy】

摘要: 141. Linked List Cycle【easy】 Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 解法一: 经典的快慢指 阅读全文

posted @ 2017-10-14 12:09 LastBattle 阅读(171) 评论(0) 推荐(0) 编辑

237. Delete Node in a Linked List【easy】

摘要: 237. Delete Node in a Linked List【easy】 Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. S 阅读全文

posted @ 2017-10-14 11:57 LastBattle 阅读(123) 评论(0) 推荐(0) 编辑

234. Palindrome Linked List【easy】

摘要: 234. Palindrome Linked List【easy】 Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? 阅读全文

posted @ 2017-10-14 11:45 LastBattle 阅读(211) 评论(0) 推荐(0) 编辑