1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
olasank [31]
3 years ago
8

Write a method intersect that accepts two sorted array lists of integers as parameters and returns a new list that contains only

the elements that are found in both lists.
Computers and Technology
1 answer:
Korvikt [17]3 years ago
7 0

Answer:

Explanation:

The following code is written in Java. It creates a function called equalElements that takes two ArrayList of integers as parameters loops through both of them to find the elements that are equal in both and then adds those elements to a new ArrayList called repeated. Then the ArrayList is returned to the user.

public static ArrayList<Integer> equalElements(ArrayList<Integer> arrOne, ArrayList<Integer> arrTwo) {

                       ArrayList<Integer> repeated = new ArrayList<>();

               for (int x: arrOne) {

                       for (int i: arrTwo) {

                               if (x == i) {

                                   repeated.add(x);

                                   break;

                               }

                       }

               }

               

               return repeated;

}

You might be interested in
I’ll mark brainliest if correct
aliya0001 [1]

Answer:

I believe the answer is B

Explanation:

5 0
3 years ago
I really want to know the best way to deal as much heart as possible plz tell me
Natasha2012 [34]

Answer:

Set aside time every day for doing something that feels positive, whether that’s journaling, meeting up with a close friend, or watching a show that makes you laugh. Scheduling in moments that bring you joy is vital for healing a broken heart. It’s important to talk about your feelings with others and not numb yourself out.

Explanation:

7 0
3 years ago
Read 2 more answers
The relationship between social media and the Internet is complex. Individual Internet behavior involves a myriad of factors tha
Artemon [7]

Answer:

Explanation:

The internet could be regarded has a marketplace or platform which gives individuals, businesses the opportunity to interact, relate, access opportunities, learn in an easy manner with the help of a data connection. The internet has redefined the process and concept of acesing information and interaction with the ease and coverage it brings. The Social media is could be seen a part of the internet platform which allows people to relate and interact, make friends, promote brands and so on. The internet and social media platforms however, in spite of its huge benefits comes with its inherent risk. Including the surge in cyber crime, immorality and information theft to mention a few. Common scenarios whereby banking details are being stolen from databases resulting in wholesale illegal transfer of funds. Issues of blackmail and violent defamation by groups of cohorts has also been a con in the advent of internet and social media, including growing trends of fake news which usually escalate tension, in which the recent unrest in my vicinity benefitted negatively from.

7 0
3 years ago
Type which type of interference we will install after installing operating system​
pentagon [3]

Answer:

There are different kinds of operating systems: such as Windows, Linux and Mac OS

There are also different versions of these operating systems, e.g. Windows 7, 8 and 10

Operating systems can be used with different user interfaces (UI): text user interfaces (TUI) and graphical user interfaces (GUI) as examples

Graphical user interfaces have many similarities in different operating systems: such as the start menu, desktop etc.

When you can recognize the typical parts of each operating system’s user interface, you will mostly be able to use both Windows and Linux as well as e.g. Mac OS.

THE ROLE OF OPERATING SYSTEM IN THE COMPUTER

An operating system (OS) is a set of programs which ensures the interoperability of the hardware and software in your computer. The operating system enables, among other things,

the identification and activation of devices connected to the computer,

the installation and use of programs, and

the handling of files.

8 0
3 years ago
(tco 3) what vbscript boolean operator could be used to replace the nested selection structure in this pseudocode? if empmedical
Leto [7]
You want both conditions to be true, so you can "And" them.
In vbscript, the and is written as "And" (not as && like other languages), so you get:

<span>If (empmedicalins = "y") And (empdentalins = "y") Then
    print empidnumber, emplastname, empfirstname
Endif</span>
3 0
3 years ago
Other questions:
  • which of the following is true about both the cyber community and the real community like the one you live in,i will give 10 poi
    6·1 answer
  • ou work as network administrator for an organization that has a Windows-based network. You want to use multiple security counter
    10·1 answer
  • To write 10 lines of code on paper:
    10·1 answer
  • An anthropologist may try to learn why and how a culture develops.<br><br> A.true<br> B.false
    13·1 answer
  • Which ofthe following is the most correct statement about the interestsection of the indirect plan for persuasion?
    8·1 answer
  • Which button, when pressed, allows light from the subject to fall on the sensor?
    8·1 answer
  • @anthonydboss23<br><br> it’s goldielove6 <br><br> .....this is not a question everyone ignore this
    11·2 answers
  • What are the steps to customize a slide show?
    10·2 answers
  • PHOTOSHOP IS A GRAPHICS EDITING PROGRAM CREATED WITH IMAGES KNOWN AS________ ​
    6·1 answer
  • Explain why computer professionals are engaged in technical services
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!