我想验证List<String>中包含的每个元素是否包含在第二个列表的任何元素中。appartment <> appart -> OK ("appartment" is not contained in "appart", but the other way around)
而<>读取:这两个字符串中的任何一个都<e
我正在尝试编写一个具有以下标头的方法:
public static boolean difference(int[] numbers, int size, int difference) {...}我希望它能够确定是否可以从列表“数字”中选择任意两个整数,以便它们之间的差等于参数“差”。到目前为止,我认为我应该创建一个列表,其中的元素包含列表"numbers“中元