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
jekas [21]
3 years ago
11

How do you do this question?

Computers and Technology
1 answer:
svet-max [94.6K]3 years ago
6 0

Answer:

int k=0;

for(int i=0;i<=13; i++)

{

   if (table[i].getKey().equals(key))

   {

             k=i;

   }

   else

  {

             continue;

  }

}

 V value= table[k].getValue();

return value;

}

   

Explanation:

Note table[i] is an entry, and we know the key as it is an argument input to the function. Hence, we find the entry position using the given key, and then find the corresponding value and return it. And this is what is required. There are 14 entries in this hashtable, as known from the question.

You might be interested in
Joshua needs to join in two cells together which of the following would perform the function
irina1246 [14]
=(Happy)&(Birthday) this is how it would be formatted 
7 0
3 years ago
Can folders have mixed apps?
sweet-ann [11.9K]

Answer:

what

Explanation:

8 0
3 years ago
Select all that apply.
bagirrra123 [75]

Answer:

explain

Explanation:

sorry didn't understand a thing you said except copying and pasting documents

3 0
3 years ago
Read 2 more answers
In a typical e-mail address the host is
Tresset [83]
The receiver of an e-mail message. 
7 0
3 years ago
Write the routines with the following declarations: void permute( const string &amp; str ); void permute( const string &amp; str
fomenos

Answer:

Here is the first routine:

void permute( const string &str ) {  // function with one parameter

 int low = 0;

 int high = str.length();

 permute(str, low, high);

}    

Or you can directly call it as:

 permute(str, 0, str.length());

Explanation:

The second routine:

void permute( const string &str, int low, int high)  

//function with three parameters

{ string str1 = str;

 if ( low == high ) {  //base case when last index is reached

   for (int i = 0; i <= high; ++i)

     cout << str1[i]; }  //print the strings  

 else {

   for (int i=low; i<high; ++i) {  // if base case is not reached

     string temp = str1;   //fix a character

     swap( str1[i], str1[low] ); //swap the values

     permute( str1, low + 1, high );  //calling recursive function (recursion case)

     swap( str1[i], str1[low] );     }  } } //swap again to go to previous position

In this function the following steps are implemented:

A character is fixed in the first position.

Rest of the characters are swapped with first character.

Now call the function which recursively repeats this for the rest of the characters.

Swap again to go to previous position, call the recursive function again and continue this process to get all permutations and stop when base condition is reached i.e. last index is reached such that high==low which means both the high and low indices are equal.

You can write a main() function to execute these functions.

int main() {

 string str;

 cout << "Enter a string: ";

 cin >> str;

 permute(str);  }

5 0
3 years ago
Other questions:
  • How do you activate a sim card in an HP probook 6470b and what drivers are needed​
    11·1 answer
  • How can you tell the value of a purchase?
    7·1 answer
  • Do debit cards offer the highest level of fraud pretection?
    10·1 answer
  • Using existing algorithms as building blocks for new algorithms has all the following benefits EXCEPT
    12·1 answer
  • Need answer Asap!!!! Which file type is the best choice if the image will be made into a billboard?
    12·1 answer
  • How do you think weather can affect sailing?<br><br>What would be good sailing weather?​
    9·1 answer
  • Guidewords for the word “serpent” may be
    8·2 answers
  • For which tasks is Layout view most helpful? Check all that apply.
    12·1 answer
  • A(n) _________ Web page displays customized content in response to keyboard or mouse actions or based on information supplied di
    5·1 answer
  • What is the difference between concrete language and abstract language? give an example of each.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!