Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
168 views
in Technique[技术] by (71.8m points)

java - 检查数组'b'中存在的数组'a'中的所有元素(Checking all elements from array 'a' that exists in array 'b')

Since this a homework project, I only need some clarification.

(由于这是一项家庭作业项目,因此我只需要澄清一下。)

I'm currently doing a homework project that asks to check all the elements in the first array (like array: a) with array 'b'.

(我目前正在做一个作业项目,要求检查数组'b'中的第一个数组(如数组:a)中的所有元素。)

When all elements in array 'a' does exists in array 'b', return true otherwise return false.

(当数组“ a”中的所有元素确实存在于数组“ b”中时,返回true,否则返回false。)

The array's does not have to be in order and I'm not using a hashing method (like: java.unil.Arrays. If I'm not wrong? Since we haven't covered yet), like I've also read on other threads of this website.

(数组不必一定是按顺序排列的,而且我也没有使用哈希方法(例如:java.unil.Arrays。如果我没记错的话?因为我们还没有介绍),就像我也读过本网站的其他主题。)

What I'm looking for is, how to check all elements in array 'a' with array 'b'?

(我正在寻找的是如何检查数组'b'中数组'a'中的所有元素?)

Note: That the elements in array b doesn't have to be presented in array a.

(注意:数组b中的元素不必出现在数组a中。)

example: array a, has the following values: 5 9 4 array b, has the following values: 9 5 7 8 6 3 4

(示例:数组a,具有以下值:5 9 4数组b,具有以下值:9 5 7 8 6 3 4)

The elements in array a must be presented in array b.

(数组a中的元素必须出现在数组b中。)

Like: 4 9 5

(喜欢:4 9 5)

Looking forward to see your replies.

(期待看到您的答复。)

  ask by NoureddineAJ translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...