摘要:
Implement a firewallprototype:bool firewall(string url, list<string> IncludedList, List<string> ExcludedList)Return true if the url is in included listReturn false if the url is in exclude... 阅读全文
随笔档案-2010年10月1日
print a complete binary tree anti-clockwise
2010-10-01 20:46 by wansishuang, 313 阅读, 收藏,
摘要:
Print all edge nodes of a complete binary tree anti-clockwise. That is all the left most nodes starting at root, then the leaves left to right and finally all the rightmost nodes.In other words, print... 阅读全文
Check whether string is interleaved
2010-10-01 09:59 by wansishuang, 158 阅读, 收藏,
摘要:
Three strings say A,B,C are given to you. Check whether 3rd string is interleaved from string A and B. Ex: A="abcd" B="xyz" C="axybczd". answer is yes.如果元素不相同的话,可以类似归并排序在0(N)时间内解决。如果不想同的话,可以递归的解决f(a, ... 阅读全文
浙公网安备 33010602011771号