纵向编辑vim

ctrl + v进入Visual Block 模式,选中某几行 按r键进入切换模式,输入要切换的内容 按I键进入左添加模式,输入要切换的内容,输入完后ESC完成添加 按A键进入右添加模式,输入要切换的内容,输入完后按ESC完成添加

2017-01-02 22:04:48

阅读数 939

评论数 0

[Leetcode]220. Contains Duplicate III @python

题目Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[...

2016-02-26 23:49:35

阅读数 993

评论数 0

[Leetcode]214. Shortest Palindrome@python

题目Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you ca...

2016-02-25 22:25:36

阅读数 600

评论数 0

[Leetcode] 212. Word Search @python

题目Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially ad...

2016-02-25 19:59:33

阅读数 602

评论数 0

[Leetcode]211. Add and Search Word - Data structure design @python

题目Design a data structure that supports the following two operations:void addWord(word) bool search(word) search(word) can search a literal word or...

2016-02-05 22:00:44

阅读数 496

评论数 0

[Leetcode]201. Bitwise AND of Numbers Range @python

题目Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.For example, given th...

2016-02-05 21:05:03

阅读数 653

评论数 0

[Leetcode]188. Best Time to Buy and Sell Stock IV@python

题目Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may comp...

2016-02-05 20:49:23

阅读数 429

评论数 0

[Leetcode] 179. Largest Number @python

题目Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed...

2016-02-05 17:00:05

阅读数 1398

评论数 0

[Leetcode]174. Dungeon Game @python

题目The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out i...

2016-02-05 16:25:48

阅读数 299

评论数 0

[Leetcode]166. Fraction to Recurring Decimal @python

题目Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeati...

2016-02-05 15:09:37

阅读数 444

评论数 0

[Leetcode]152. Maximum Product Subarray @python

题目Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4]...

2016-02-05 14:30:35

阅读数 466

评论数 0

[Leetcode]149. Max Points on a Line @python

题目Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.题目要求给定n个2维平面上的点,找到在同一直线上最多的点数。解题思路在同一直线上要求所有点的斜率...

2016-02-05 14:06:11

阅读数 381

评论数 1

[Leetcode]146. LRU Cache @python

题目Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get t...

2016-01-29 13:56:46

阅读数 860

评论数 0

[Leetcode]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 ...

2016-01-28 12:08:55

阅读数 553

评论数 0

[Leetcode]126. Word Ladder II python

题目Given two words (beginWord and endWord), and a dictionary’s word list, find all shortest transformation sequence(s) from beginWord to endWord, such...

2016-01-24 23:42:52

阅读数 1141

评论数 0

[Leetcode]127. Word Ladder@python

题目Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWor...

2016-01-24 22:33:15

阅读数 1125

评论数 0

[Leetcode]105. Construct Binary Tree from Preorder and Inorder Traversal@python

题目Given preorder and inorder traversal of a tree, construct the binary tree.Note: You may assume that duplicates do not exist in the tree.题目要求给定对一个b...

2016-01-24 14:17:16

阅读数 482

评论数 0

[Leetcode] 98. Validate Binary Search Tree @python

题目Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains onl...

2016-01-24 13:49:55

阅读数 422

评论数 0

[Leetcode]97. Interleaving String @python

题目Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example, Given: s1 = “aabcc”, s2 = “dbbca”,When s3 = “aadbbcbca...

2016-01-24 12:40:50

阅读数 313

评论数 0

[Leetcode]91. Decode Ways@python

题目A message containing letters from A-Z is being encoded to numbers using the following mapping:‘A’ -> 1 ‘B’ -> 2 … ‘Z’ -> 26 Given an e...

2016-01-23 18:38:34

阅读数 1022

评论数 0

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