Full question:
Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and then deque 2 elements. Which indices of the internal array elements hold the remaining elements? a) 0 to 2 b) 7 to 9 c) 2 to 4 d) 1 to 3
Answer and Explanation:
If you instantiate a capacity of 10 for the queue, you have the queue a capacity of not more than 10 values.
To enqueue means to add an element to the array(if it's not full, n<10)
To dequeue means to delete an element from the array or queue(if n! =0)
From the question, for example:
We create a queue of capacity 10:
Queue q(10);
We add elements/enqueue 5 elements to the queue :
q.queueEnqueue(10);
q.queueEnqueue(5);
q.queueEnqueue(8);
q.queueEnqueue(9);
q.queueEnqueue(2);
If we print this out:
q. queueDisplay()
We would get:
10, 5, 8, 9, 2
We remove elements/dequeue 2 elements from the queue :
q. queuedequeue();
q. queuedequeue();
We print it out:
q. queueDisplay()
8 ,9, 2
We observe that deletion/dequeue starts from the front/first index.
We are left with indices 2, 3, 4 or 2 to 4
Note: the above methods/ functions and objects used are merely for example purposes. The queue uses a floating front design approach.
The answer is a) <span>so you can provide enough time studying. </span>
Answer:
Table for Area codes are not missing;
See Attachment for area codes and major city I used
This program will be implemented using c++ programming language.
// Comments are used for explanatory purposes
// Program starts here
#include <iostream>
using namespace std;
int main( )
{
// Declare Variable area_code
int area_code;
// Prompt response from user
cout<<Enter your area code: ";
cin<<"area_code;
// Start switch statement
switch (area_code) {
// Major city Albany has 1 area code: 229...
case 229:
cout<<"Albany\n";
break;
// Major city Atlanta has 4 area codes: 404, 470 678 and 770
case 404:
case 470:
case 678:
case 770:
cout<<"Atlanta\n";
break;
//Major city Columbus has 2 area code:706 and 762...
case 706:
case 762:
cout<<"Columbus\n";
break;
//Major city Macon has 1 area code: 478...
case 478:
cout<<"Macon\n";
break;
//Major city Savannah has 1 area code: 912..
case 912:
cout<<"Savannah\n";
break;
default:
cout<<"Area code not recognized\n";
}
return 0;
}
// End of Program
The syntax used for the above program is; om
Answer their questions and if you don't get their questions, make sure to ask them out it to clarify it
Answer:
The answer is: letter C, For obviously misspelled queries, base the utility rating on user intent.
Explanation:
The question above is related to the job of a "Search Quality Rater." There are several guidelines which the rater needs to consider in evaluating users' queries. One of these is the "User's Intent." T<u>his refers to the goal of the user. </u>A user will type something in the search engine because he is trying to look for something.
In the event that the user "obviously" misspelled queries, the rate should be based on his intent. It should never be based on why the query was misspelled or how it was spelled. So, no matter what the query looks like, you should assume that the user is, indeed, searching for something.
Rating the query will depend upon <u>how relevant or useful it is and whether it is off topic. </u>