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
Sedbober [7]
3 years ago
5

Define an ADT for a two-dimensional array of integers. Specify precisely the basic operations that can be performed on such arra

ys. Next, imagine an application that stores an array with 1000 rows and 1000 columns, where less than 10,000 of the array values are non-zero. Describe two different implementations for such arrays that would be more space efficient than a standard two-dimensional array implementation requiring one million positions.
Engineering
1 answer:
VashaNatasha [74]3 years ago
6 0

Answer:

Explanation:

ADT for an 2-D array:

struct array{

int arr[10];

}arrmain[10];

An application that stores an array with 1000 rows and 1000 columns, where less than 10,000 of the array values are non-zero. The two different implementations for such arrays that would be more space efficient than a standard two-dimensional array implementation requiring one million positions are :

1) struct array{

int *p;

}arr[1000];

2) struct array{

int *p;

}arr[1000];

You might be interested in
Tech A says that in some cases, the electronic brake control module can be programmed with a new tire size to restore proper ele
Vlad [161]

Answer:

Both Techs A and B

Explanation:

Electronic braking systems are controlled by the electronic brake control module. It is a microprocessor that processes information from wheel-speed sensors and the hydraulic brake system to determine when to release braking pressure at a wheel that's about to lock up and start skidding  and activates the anti lock braking system or traction system when it detects it is necessary.

Some electronic brake control modules can be programmed to the size of the vehicle's new tires to restore proper electronic brake control performance. While others may require replacing the module to match the module's programming to the installed tire size. So, both technicians A and B are correct.

3 0
3 years ago
How can we calculate the speed of the output gear in a simple gear train? Explain with the help of an example.
Snowcat [4.5K]

Answer:

N_3=\dfrac{T_1}{T_3}N_1

Explanation:

In the diagram there three gears in which gear 1 is input gear ,gear 2 is idle gear and gear 3 is out put gear.

Lets take

Speed\ of\ gear 1=N_1

Number\ of\ teeth\ of\ gear 1=T_1

Speed\ of\ gear 3=N_3

Number\ of\ teeth\ of\ gear 3=T_3

All external matting gears will rotates in opposite direction with respect to each other.

So the speed of gear third can be given as follows

\dfrac{T_1}{T_3}=\dfrac{N_3}{N_1}

N_3=\dfrac{T_1}{T_3}N_1

3 0
3 years ago
The Stefan-Boltzmann law can be employed to estimate the rate of radiation of energy H from a surface, as in
Mazyrski [523]

Explanation:

A.

H = Aeσ^4

Using the stefan Boltzmann law

When we differentiate

dH/dT = 4AeσT³

dH/dT = 4(0.15)(0.9)(5.67)(10^-8)(650)³

= 8.4085

Exact error = 8.4085x20

= 168.17

H(650) = 0.15(0.9)(5.67)(10^-8)(650)⁴

= 1366.376watts

B.

Verifying values

H(T+ΔT) = 0.15(0.9)(5.67)(10)^-8(670)⁴

= 1542.468

H(T+ΔT) = 0.15(0.9)(5.67)(10^-8)(630)⁴

= 1205.8104

Error = 1542.468-1205.8104/2

= 168.329

ΔT = 40

H(T+ΔT) = 0.15(0.9)(5.67)(10)^-8(690)⁴

= 1735.05

H(T-ΔT) = 0.15(0.9)(5.67)(10^-8)(610)⁴

= 1735.05-1059.83/2

= 675.22/2

= 337.61

5 0
3 years ago
C++A palindrome is a string such as "madam", "radar", "Dad", and "I", that reads the same forwards and backwards. The empty stri
jeka57 [31]

Answer:

See explaination

Explanation:

#include <iostream>

#include<string.h>

using namespace std;

bool isPalindrome(string str, int lower, int upper){

if(str.length() == 0 || lower>=upper){

return true;

}

else{

if(str.at(lower) == str.at(upper)){

return isPalindrome(str,lower+1,upper-1);

}

else{

return false;

}

}

}

int main(){

string input;

cout<<"Enter string: ";

cin>>input;

if(isPalindrome(input,0,input.length()-1)){

cout<<input<<" is a palindrome"<<endl;

}

else{

cout<<input<<" is NOT a palindrome"<<endl;

}

return 0;

}

5 0
3 years ago
Suppose values is a sorted array of integers. Give pseudocode that describes how a new value can be inserted so that the resulti
Novosadov [1.4K]

Answer:

insert (array[] , value , currentsize , maxsize )

{

   if maxsize <=currentsize

  {

      return -1

  }

  index = currentsize-1

  while (i>=0 && array[index] > value)

  {

      array[index+1]=array[index]

      i=i-1

  }

 

  array[i+1]=value

  return 0

}

Explanation:

1: Check if array is already full, if it's full then no component may be inserted.

2: if array isn't full:

  • Check parts of the array ranging from last position of range towards initial range and determine position of that initial range that is smaller than the worth to be inserted.  
  • Right shift every component of the array once ranging from last position up to the position larger than the position at that smaller range was known.
  • assign new worth to the position that is next to the known position of initial smaller component.
7 0
3 years ago
Other questions:
  • The temperature of a flowing gas is to be measured with a thermocouple junction and wire stretched between two legs of a sting,
    8·1 answer
  • What are the two safety precautions taken before driving a car​
    12·1 answer
  • A town is designing a rectangular, 4m deep settling tank for treating surface water intake. The tank will have a flow velocity o
    14·1 answer
  • 6
    5·1 answer
  • Cómo se llama el componente, que permite abrir o cerrar un circuito eléctrico
    8·1 answer
  • Which source would be the best to base a hypothesis upon
    9·1 answer
  • Which word from the passage best explains what the web in the passage symbolizes
    10·1 answer
  • How does the Ivanpah Solar Plant make electricity?
    12·1 answer
  • Select the correct answer
    15·1 answer
  • When framing a building, a simple way to estimate the total amount of wall studs needed is to allow
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!