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
mars1129 [50]
3 years ago
9

Would you rather be rich and unknown or famous and poor

Computers and Technology
1 answer:
ollegr [7]3 years ago
5 0

Answer:

rich g

Explanation:

You might be interested in
The ArrayList class contains a trim method that resizes the internal array to exactly the capacity. The trim method is intended
andreev551 [17]

Answer:

public void trimToSize() {

modCount++;

if (size < elementData.length) {

elementData = (size == 0)

? EMPTY_ELEMENTDATA

: Arrays.copyOf(elementData, size);

}

}

Now, the running time for copyOf() function is O(N) where N is the size/capacity of the ArrayList. Hence, the time complexity of trimToSize() function is O(N).

Hence, the running time of building an N-item ArrayList is O(N^2).

Please find the sample code below.

CODE

==================

import java.util.ArrayList;

public class Driver {

  public static void main(String[] args) throws Exception{

      int N = 100000;

      ArrayList<Integer> arr = new ArrayList<>(N);

     

      long startTime = System.currentTimeMillis();

      for(int i=0; i<N; i++) {

          arr.add(i);

          arr.trimToSize();

      }

      long endTime = System.currentTimeMillis();

      double time = (endTime - startTime)/1000;

      System.out.println("Total time taken = " + time + " seconds.");

  }

}

Explanation:

5 0
4 years ago
Memememememmemememememememmmeememememe
Alexus [3.1K]

l o l l o l l o l ha ha ha ha ha l o l

7 0
3 years ago
You should structure the first before you search for a relevant picture.
Zarrin [17]
No, I believe it is "You should use proper grammar when asking a question".
6 0
3 years ago
Write the statement that includes a friend function named before in the class dateType that takes as parameters two objects of t
Lerok [7]

Answer:

In opp friend function is a function that gives the same access to private and protected data. It is declared in class that is granting access.

Explanation:

#include<iostream.h>

using namespace std;

class Sum

{

 int a, b, add;

 public:

 void input()  

{

 cout << "Enter the value of l and m:";

 cin >> l>>m;     taking input from users

}

 friend void add(sum &t);

 void display()  

{

  cout << "The sum is :" << z;

}

};

 void add(sum & p)  

{

  p.add = p.a + p.b;

}

 int main()  

{

  sum p1;

  p1.input();

  add(p1);

  p1.display();

  return false;  

if(display==5)  

{

 return true;  //true is returned if sum is equal to 5

}

else        //if they are not the same

{

 return false;

}

}

8 0
3 years ago
IoT is the interconnection of what?<br> Hardware<br> Networks<br> Everyday devices<br> Cables
Dominik [7]

Answer:

Everyday Devices

Explanation:

As we know that Internet of Things (IOT) include connected security systems, thermostats, cars, electronic appliances, lights in household and commercial environments, alarm clocks, speaker systems and vending machines.

3 0
4 years ago
Other questions:
  • Create a class named Person that holds the following fields: two String objects for the person’s first and last name and a Local
    5·2 answers
  • Which best describes color blindness?
    8·1 answer
  • The monkey-and-bananas problem is faced by a monkey in a laboratory with some bananas hanging out of reach from the ceiling. A b
    8·1 answer
  • Your employer is opening a new location, and the IT director has assigned you the task of calculating the subnet numbers for the
    14·1 answer
  • Many businesses use robotic solutions. Which department of the food and beverage industry uses robotic solutions on a large scal
    10·2 answers
  • What is the most recent version of Microsoft Windows?
    12·2 answers
  • Ellen is expecting to get a 3% raise next year. She enters .03 in cell D2 so that she can predict her monthly income for the nex
    12·1 answer
  • Read the scenario below, and then answer the question.
    13·1 answer
  • What are the significances of blogs?
    7·2 answers
  • How does a Cloud-first strategy approach a client's migration to the Cloud?by removing outside ecosystem partners from the Cloud
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!