相关疑难解决方法(0)

Set操作的复杂性

这就是我在做的事情:
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)

java complexity-theory set

2
推荐指数
1
解决办法
4972
查看次数

标签 统计

complexity-theory ×1

java ×1

set ×1