Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist ...
分类:
其他好文 时间:
2016-09-03 20:58:38
阅读次数:
183
发展一个有效算法的具体(一般)过程: union-find用来解决dynamic connectivity,下面主要讲quick find和quick union及其应用和改进。 基本操作:find/connected queries和union commands 动态连接性问题的场景: 1.1 建 ...
分类:
其他好文 时间:
2016-09-03 18:05:16
阅读次数:
168
[题目] Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more lette ...
分类:
其他好文 时间:
2016-09-03 16:33:36
阅读次数:
171
14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. 找出字符串集合的最长公共前缀。 思路:先计算出前两个字符串的最长公共前缀s ...
分类:
其他好文 时间:
2016-09-03 16:26:54
阅读次数:
130
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assume the ...
分类:
其他好文 时间:
2016-09-03 14:49:53
阅读次数:
113
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. ...
分类:
其他好文 时间:
2016-09-03 13:44:09
阅读次数:
142
Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati ...
分类:
其他好文 时间:
2016-09-03 08:35:21
阅读次数:
140
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette ...
分类:
其他好文 时间:
2016-09-03 07:30:16
阅读次数:
135
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette ...
分类:
其他好文 时间:
2016-09-03 06:24:45
阅读次数:
163
1、显示当前系统上root、fedora或user1用户的默认shell;PS:第一眼看到问题可能会有点头疼,那就把问题拆分完成,组合多个简单命令完成复杂工作
第一步,查找到这些用户并显示:使用|或衔接多个过滤条件:
[root@CentOS7~]#grep-E"^root\>|^fedora\>|^user1\>"/etc/..
分类:
系统相关 时间:
2016-09-02 23:37:06
阅读次数:
415