这就是我在做的事情:
String one ="some string"
String two ="some string"
我想知道字符串一和二中的所有字符,它们应该按顺序排列,因为它们在字符串1中
我编写了一个Java程序,通过使用Collections对集合执行set操作.
我想知道执行集合运算的复杂性是多项式时间还是线性时间
我的节目就在这里
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package careercup.google;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/**
*
* @author learner
*/
public class CharaterStringsIntersection {
private static final String one = "abcdefgabcfmnx";
private static final String two = "xbcg";
public static void main(String args[]){
List<Character> l_one = new ArrayList<Character>(); …Run Code Online (Sandbox Code Playgroud)