[题目] 输入两个字符串,从第一字符串中删除第二个字符串中所有的字符.例如,输入”They are students.”和”aeiou”,则删除之后的第一个字符串变成”Thy r stdnts.”. [分析] 这是一道微软面试题.在微软的常见面试题中,与字符串相关的题目占了很大的一部分,因为写程序操作字符串能很好的反映我们的编程基本功. 要编程完成这道题要求的功能可能并不难.毕竟,这道题的基本思路就是在第一个字符串中拿到一个字符,在第二个字符串中查找一下,看它是不是在第二个字符串中.如果在的话,
java关于split分割字符串,空的字符串不能得到的问题 class T { public static void main(String args[]) { String num[] = new String[11]; String sLine = "101494|360103660318444|2008/06/17|周润英|1292.0|3085.76|2778.28|912.91|106.0|||"; num = sLine.split("\\|");
做如下替换: 将字符串asd#sdf#sdfsf中含# …# 形式的子串删除,写出sql语句 sql语句如下: UPDATE MM SET name =substring(name,0,CHARINDEX('#',name))+reverse(substring(reverse(name),0,CHARINDEX('#',reverse(name)))) WHERE name like '%#%#%'
Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one character in either string. Example 1: Input: "sea", "eat" Output: 2 Explanation: You ne
Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one character in either string. Example 1: Input: "sea", "eat" Output: 2 Explanation: You ne