转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudA. Two SubstringsYou are given strings. Your task is to determine if the given stringscontains two non...
分类:
其他好文 时间:
2015-06-05 06:22:58
阅读次数:
484
题目:Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For exa...
分类:
其他好文 时间:
2015-06-04 22:35:43
阅读次数:
130
题目:
One Edit Distance
Given two strings S and T, determine if they are both oneedit distance apart.
Hint:
1. If | n – m | is greater than 1, we know immediately both are not one-editdistance a...
分类:
其他好文 时间:
2015-06-04 17:17:29
阅读次数:
112
【题目】Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: ...
分类:
其他好文 时间:
2015-06-04 17:02:05
阅读次数:
105
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For e...
分类:
编程语言 时间:
2015-06-04 11:23:19
阅读次数:
138
$PSVersionTable.PSVersion 参考资料 ================ http://stackoverflow.com/questions/1825585/determine-installed-powershell-version http://blogs.technet...
分类:
系统相关 时间:
2015-06-03 15:40:57
阅读次数:
130
Given two strings s and t, determine if they are isomorphic.
Two strings are isomorphic if the characters in s can be replaced to get t.
All occurrences of a character must be replaced with anot...
分类:
其他好文 时间:
2015-06-03 12:02:50
阅读次数:
99
Given a string containing just the characters '(', ')',
'{', '}', '[' and ']', determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are all valid b...
分类:
其他好文 时间:
2015-06-03 10:02:51
阅读次数:
141
超时版:/*Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occur...
分类:
其他好文 时间:
2015-06-03 00:54:17
阅读次数:
123
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
基本思路:
快慢两指针。
一个指针每次移动一步,另一个指针每次移动两步。如存在环,必有相遇的时候。
/**
* Definition for singly-li...
分类:
其他好文 时间:
2015-06-02 17:57:11
阅读次数:
89