自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

sunshine

不积跬步无以至千里

  • 博客(22)
  • 收藏
  • 关注

转载 IMP-00017 Oracle数据库imp命令导入时1659错误处理

我自己也遇到类似的问题(IMP-00017: 由于 ORACLE 错误 1659, 以下语句失败: "CREATE TABLE "GZQD_TYFB_DYD),然后按照原博主的方法二,是可以的。——-20160929今儿在自己电脑上搭建开发环境,在给数据库导入表结构以及数据时报1659错误,错误内容如下: IMP-00017: 由于 ORACLE 错误 1659, 以下语句失败: “CREATE

2016-09-29 09:38:01 5907

原创 328. Odd Even Linked List (python)

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes. You should try to do it in pl

2016-09-19 22:13:42 380

原创 148. Sort List (python)

Sort a linked list in O(n log n) time using constant space complexity. 思路:能够有O(n lgn)时间复杂度的算法为,快速排序,堆排序,归并排序,三者的空间复杂度分别为O(1), O(N),O(N) 其中归并排序,其的基本思路就是将数组分成二组A,B,如果这二组组内的数据都是有序的,那么就可以很方便的将这二组数据进行排序。如

2016-09-19 22:12:26 961

原创 147. Insertion Sort List (python)

Sort a linked list using insertion sort. 题意:采用插入排序法对链表进行排序 思路:类似于扑克牌按照从小到大插入,将第i个元素与左边已排序的元素比较,找到位置插入即可 排序方法可参考:http://blog.csdn.net/yang_yulei/article/details/27237641#comments 数组是将比要插入的元素大的数值往后移,

2016-09-19 22:11:41 1141

原创 143. Reorder List(python)

Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes’ values. For example, Given {1,2,3,4}, reorder it to {1,4,

2016-09-18 22:11:48 470

原创 142. Linked List Cycle II(python)

Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up: Can you solve it without using extra space? Subscribe

2016-09-18 21:56:31 442

原创 109. Convert Sorted List to Binary Search Tree(python)

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 题意:将有序单链表转换成二叉搜索树 思路:采用递归的思想,寻找中点构造二叉搜索树,左子树和右子树分别递归即可,注意递归停止的条件:无结点或者只有一个叶子结点 注意:无结点时返回

2016-09-18 21:55:07 466

原创 92. Reverse Linked List II(python)

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, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note: Given m, n satisfy the follow

2016-09-18 21:54:15 378

原创 86. Partition List(python)

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of th

2016-09-18 21:53:13 459

原创 82. Remove Duplicates from Sorted List II(python)

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1->1-

2016-09-18 21:52:00 323

原创 61. Rotate List(python)

Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 题意:链表向右移动K位 Runtime: 42 ms 思路: 获取链表

2016-09-18 21:50:31 353

原创 2、add two numbers(python)

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linke

2016-09-18 21:49:47 1797

原创 237. Delete Node in a Linked List(python)

Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3,

2016-09-18 21:47:47 695

原创 234. Palindrome Linked List(python)

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? 题意:给定一个链表,判断其是否为回文链表 eg:1 2 3 2 1 or 1 2 2 1 思路:找到中心点,前后对比思路一:考虑到单链表缺失从后向前的信息(

2016-09-18 21:45:15 1041

原创 206. Reverse Linked List(python)

题意:翻转链表思路一:入栈出栈,利用数组模拟栈,入栈即每次在数组的开头加入数,出栈即从数组的开头开始 空间复杂度为O(n) Runtime: 76 ms思路二:头结点倒插,类似于思路一,原链表头结点依次插入新链表的开头,返回新链表 空间复杂度为O(1) Runtime: 68 ms思路三:递归!!!每一次递归返回的n中,需明白n指向返回的链表的头结点,这就是引入n的重要性 h和p仍为该循

2016-09-18 21:42:38 508

原创 203. Remove Linked List Elements(python)

Remove all elements from a linked list of integers that have value val. Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5 Runtime: 156 ms 总结:建立虚表头,比较p.next,如果p.

2016-09-18 21:39:48 1004

原创 160. Intersection of Two Linked Lists(python)

Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 ↘

2016-09-18 21:38:02 1019

原创 141. Linked List Cycle(python)

Given a linked list, determine if it has a cycle in it. runtime:92ms 总结:快慢指针法,建立虚表头,快指针走两步,慢指针走一步,若存在环,则快指针会追上慢指针# Definition for singly-linked list.# class ListNode(object):# def __init__(self

2016-09-18 21:36:20 483

原创 83. Remove Duplicates from Sorted List(python)

Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. 题意:排序的链表删除重复的元素,保证每个元素出现一次

2016-09-18 21:34:35 1094

原创 24. Swap Nodes in Pairs(python)

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 algorithm should use only constant space. You ma

2016-09-18 21:33:51 445

原创 21. Merge Two Sorted Lists(python)

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 题意:按顺序拼接两个已排序的链表 runtime:76ms 记住虚表头dummy设定好了千万不要动,设定一个p=

2016-09-18 21:32:17 2004

原创 19. Remove Nth Node From End of List(python)

Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the li

2016-09-18 21:30:12 380

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除