- 博客(12)
- 资源 (1)
- 收藏
- 关注
转载 ubuntu terminal修改ls的颜色
zz1. 利用dircolors命令,查看我们的系统当前的文件名称显示颜色的值,然后利用管道重定向到用户目录下的任意一个文件(这里我们创建了一个.dir_colors文件) 命令1: cd ~ 命令2: dircolors -p > .dir_colors2. 用vim打开.dir_colors文件,然后找到“DIR 01;34” //这里的01表
2014-09-29 09:42:01 1218
原创 Maximum Product Subarray
Leetcode又更新了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],the contiguous subarray
2014-09-24 13:56:16 1138 1
原创 Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointer to point to its next right node.
2014-09-22 20:47:14 557
原创 Populating Next Right Pointers in Each Node II
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution still work?Note:You may only use constant
2014-09-22 20:42:29 577
原创 Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is
2014-09-14 00:04:53 520
原创 Pascal's Triangle II
Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?class So
2014-09-07 21:11:29 513
原创 Swap Nodes in Pairs
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. Y
2014-09-06 17:30:36 428
原创 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of convertin
2014-09-05 16:36:37 443
原创 Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe
2014-09-05 16:05:10 626
原创 Reverse Linked List II
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 t
2014-09-04 22:41:32 769
原创 python datetime和str转换 计算时间差;Python 函数接收元组和字典参数
server上跑housecleaning的脚本,需要比较时间内容
2014-09-04 09:57:39 3359
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人