Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m...
分类:
其他好文 时间:
2015-07-28 00:49:13
阅读次数:
132
脚本内容如下:#!/bin/bashfunction delete_file{dir=$1days=$[$2-1]for i in `find $dir -type f -ctime +$days`do rm -rf $idone}while read linedodir=`echo $line ....
分类:
系统相关 时间:
2015-07-28 00:36:14
阅读次数:
111
问题:Find the missing element in a given permutation.1、PHP部分 1 //时间复杂度O(n),空间复杂度O(1) 2 //通过率100% 3 function solution($A) { 4 // write your code in P...
分类:
其他好文 时间:
2015-07-28 00:34:14
阅读次数:
192
LeetCode 3_Longest Substring Without Repeating Characters
题目描述:
Given a string, find the length of the longest substring
without repeating characters. For example, the longest substring without re...
分类:
其他好文 时间:
2015-07-27 23:10:47
阅读次数:
106
Linux 克隆后修改ip find / -name "*net.rules" 找到此文件 注销eth0 的那2行; 修改 eth1 为 eth0. 将上一步打开文件中的mac 地址复制 修改本机的mac 为第3步中复制的那一个。 vim /etc/sysconfig/network-scripts...
分类:
系统相关 时间:
2015-07-27 22:31:42
阅读次数:
153
Problem Definition:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring withoutre...
分类:
其他好文 时间:
2015-07-27 20:57:10
阅读次数:
105
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matrix:1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0
Return ...
分类:
其他好文 时间:
2015-07-27 19:12:53
阅读次数:
106
Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose a sorted array is rotated at some pivot unknown to yo...
分类:
其他好文 时间:
2015-07-27 19:09:38
阅读次数:
97
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicate exists in the array.思路分析...
分类:
其他好文 时间:
2015-07-27 19:09:24
阅读次数:
117
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.
According to the
definition of LCA on Wikipedia: “The lowest common ancestor is defined betwee...
分类:
其他好文 时间:
2015-07-27 18:48:41
阅读次数:
80