1,534 Answered Questions for the topic computer science
Computer Science
05/06/22
Which polynomial time algorithm would you use to solve this if there is one to solve?
A group of m primary students is given a list of n foods offered by the cafeteria. Each student is asked to write down their 2 favorite foods. Each student must write exactly two food preferences....
more
05/04/22
how is this done??
Write a complete C++ command to implement a "Sum of Numbers in Range" (sonir) program. Place all your code inside the main() routine; do not write any extra user-defined functions. To minimize your...
more
Computer Science C++
05/01/22
How to implement a template linked list in C++?
I need to implement a Template Linked List in C++ , and I'm asked to use three Fixed file(which is cannot changed):ContainerIfc.h
class BADINDEX {};
template <class T>
class ContainerIfc {
...
more
Computer Science Computer Programming
04/28/22
Computer Science Code
I need the code and some explanations to the following prompt for coding because I am struggling with arrays and loops(1301 computer science)How could I create a game for combat ships? I have to...
more
04/27/22
HOW CAN THIS ERROR BE FIXED?
inlab21.cpp: In member function ‘DataType Queue::dequeue()’:inlab21.cpp:28:2: error: ‘temp’ was not declared in this scope temp=frontPtr================================// This is the default...
more
04/27/22
i got an error saying this.
main21.cpp: In function ‘int main()’:main21.cpp:49:26: error: ‘maxlength’ was not declared in this scope if(qLength>maxLength) maxlength = qLength;...
more
04/26/22
JAVA CODE NEEDS MISSING CODE
This java code below done in java swing has missing code in the TODO sections down below within the code, I need help adding these missing lines please. I have bolded them in the code:import...
more
04/26/22
Define a function OutputVal() that takes two integer parameters and outputs the product of all integers starting with the first and ending with the second parameter, followed by a newline.
Ex. if the input is 3 and 5 the output is 60 (3*4*5).
04/23/22
Longest Repeat Problem: Find the longest repeat in a string.
Although the suffix tree decreases memory requirements from O(|Text|2) to O(|Text|), on average it still requires about 20 times as much memory as Text (when the length of Text is on the order of...
more
04/19/22
Write Wombat1 machine language program
A function is defined as follows: 𝑓(𝑛) = { 𝑛 − 2 𝑓𝑜𝑟 𝑛 < 1 𝑛 + 5 𝑓𝑜𝑟 𝑛 = 1 𝑛 2 − 2𝑛 + 1 𝑓𝑜𝑟 𝑛 > 1Write Wombat1 machine language program that reads an input...
more
Computer Science
04/18/22
The program below is nevertheless incorrect. Explain why. Suppose we change the if in line 6 to a while. Does this solve any problem in the program? Do any difficulties remain?
Consider a sharable resource with the following characteristics: 1) as long as there are fewer than three processes using the resource, new processes, new processes can start using it right away....
more
04/13/22
Business statistics
Temperature is used to measure the output of a production process. When the process is in control, the mean of the process is mean = 133.7 and the standard deviation is = 0.7.a. Construct...
more
Computer Science
04/08/22
How would I solve this dynamic programming question with a table?
Once again your are going on a long bike ride with your e-bike. You must ride exactly n miles. You will need to replace your battery along the way. The bike trail is lined with battery pick-up...
more
04/08/22
NEED HELP WITH THIS
file deleteIthNode.cpp so that it finishes the implementation of the method deleteIthNode. This method deletes the ith item from a list of items. #include "structs.h"//Function to delete the ith...
more
04/07/22
Microinstructions code phrases.
Suppose you come across the following binary microinstructions in the format described in class. Describe the micro-operations that each one executes. Write the phrases for each.1. 0001 0001...
more
04/07/22
microinstructions
Give the binary microinstruction corresponding to each of the following sets of micro-operations. should be 32 bits for each.
Increment SP by 1. Store the results back in the SP. Load the...
more
04/03/22
Augmented Binary Search Trees
Given an unsorted set of n distinct numbers, suppose we are interested in carrying out the following two operations: • Select the element of rank k. This operation will be carried out 1 ≤ m ≤ n...
more
Computer Science Computer Programming
04/02/22
Dynamic Programming Pseudocode
Suppose you are going on a long bike ride with your e-bike. You must ride exactly n miles. You will need to stop to replace your battery along the way. The bike trail is lined with battery pick-up...
more
Computer Science Programming
04/01/22
Algorithm to get the longest Palindrome substring output from a table of size n
The Longest Palindrome Substring, produces a table L [i, j] where L [i, j] is defined as 1 if the substring s [i, j] is a palindrome, and 0 otherwise. The table dimensions are n × n. Using the...
more
Computer Science
03/29/22
A smartphone may also be used as a modern
Computer Science Theory Of Automata
03/29/22
Build NFAs for the following languages:
{w ∈ {0, 1} ∗ | w contains any of the substrings 010, 011 or 1100}, • {w ∈ {0, 1} ∗ | w contains the substrings 010, 011 and 1100}, • {w ∈ {0, 1} ∗ | w has a 0 in the third place}, • {w ∈ {0, 1} ∗...
more
Computer Science
03/28/22
JAVA QUESTION Write a method that computes the following series below: HINT: Use a loop and Math.pow() to raise t to the nth power.
Computer Science
03/28/22
Java Question, Write ONLY the line of code to call the following methods. Use whatever values you want for the parameters. If there is a return type, you must assign the method call to it's type
public static int getNum(double x, double y)b. public static void printMe(String s, int num)c. public static double[ ] getArray(int amount)d. public static char someChar(char c)
Computer Science
03/28/22
Pseudo code Binary Search Tree
Suppose T is the root node of a Binary Search Tree. Tree nodes will be implemented with the usual BST attributes, and an additional attribute called x.deleted is included, which can be set to True...
more
03/27/22
Adjust list by normalizing
When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This adjustment can be done by normalizing to values between 0 and 1, or throwing...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.