Questions
1) Given the list of integers 1, -2, 3, -6, 7, -8, 9, 10, -11, indexed...

1) Given the list of integers 1, -2, 3, -6, 7, -8, 9, 10, -11, indexed from 1 to 9, the left-to-right linear scan algorithm (O(n) algorithm) will set as candidate start positions for a maximum contiguous sequence the elements at the index positions:

(a) 1,3,4,6

(b) 1,3,4,6,9

(c) 1,3,5,7

(d) none of the above

2)The Fibonacci sequence 1,1,2,3, ... can be generated iteratively by starting with the first two (0th and 1st) and generating every subsequent one by adding the previous two. In fact, the nth Fibonacci number can be generated by n − 1 additions for n ≥ 2. Thus we need 5 additions to generate the 6th Fibonacci number. However, a recursive program to generate the 6th Fibonacci number needs:

(a) 12 additions (b) 11 additions (c) 10 additions (d) None of the above

3)we can use a stack to check if a string made up of open, “(”, and closed, “)”, parentheses is balanced. Simulate this algorithm on the input string “((()))(())()” to determine if it is balanced or not. (this means you must explicitly write down the sequence of pushes and pops that the algorithm would generate

In: Computer Science

What makes someone a "power" internet user? What makes someone a regular internet user?

What makes someone a "power" internet user? What makes someone a regular internet user?

In: Computer Science

In C++ Write a program to store exam scores into a file. The program will ask...

In C++ Write a program to store exam scores into a file. The program will ask the user how many exam scores to enter. Then it will ask the user for each exam score and store them in a file called scores.dat The file output should have the following format: Exam 1: 97 Exam 2: 85

In: Computer Science

The Scenario: A company is transitioning from a spreadsheet model to a database to track customers...

The Scenario:

A company is transitioning from a spreadsheet model to a database to track customers and purchases.

The Request:

  • You need to normalize the data up to N3.

Requirements and Information:

  • Normalize the below spreadsheet:
    • Normalize_Assignment2.csv

Need help as the following:

Upload an excel spreadsheet wit the normalized data

Customer Name Customer Address Phone Number(s) Products Purchased Distribution Warehouse Distribution Warehouse Address Distribution Warehouse Phone Number Date of Purchase
Matt Smith 11 Kevlar Ln., Grand Rapid, MI 49508 616-610-2718, 616 473-2813 Blu Ray Player, HDMI cable East Mountain Distribution Center 23 Hangster St. Brooklyn, NY 13867 212202-4321 10/31/18
Keith Jones 66 Buthers Point, Carson City, Nebraska 89403 775-246-3712 U2 Album West Coast Distribution Center 3245 Lovers Ln, Lexington, KY 21482 414.321.4326 11/1/18
Brian Adams 63 Lovingtin Cir., Newark DE 19701 410-428-2367 Retro Pi, MicroSD Card, Raspberry Pi Case Tri-State Distribution Center 1397 S. Main Street, Middletown, DE 19709 302-434-5566 10/31/18
Julia Townsend 5 Pennywise Ln., Yardley, PA 19067 972-274-6289 Blu Ray Player Tri-State Distribution Center 1397 S. Main Street, Middletown, DE 19709 302-434-5566 11/5/18
Mo Rocca 871 Eagle Ct., Newark, NJ 21908 Unknown Mini NES, DaVinci Code Book East Mountain Distribution Center 23 Hangster St. Brooklyn, NY 13867 212202-4321 10/31/18
Steven James 4 Autumn Ter., Boulder CO 80301 970-273-1856 White glue, glitter, saline solution, baking soda West Coast Distribution Center 3245 Lovers Ln, Lexington, KY 21482 414.321.4326 11/7/18
Rick Ford 333 33rd St NY, NY 10027 347-383-8844 Paint Set, Canvas, Paint Brushes East Mountain Distribution Center 23 Hangster St. Brooklyn, NY 13867 212202-4321 11/5/18
Harrison Wells 12534 Silver Lake Ave., Houston TX 77027 269-226-1599, 267-227-4891 Harry Potter Book Series West Coast Distribution Center 3245 Lovers Ln, Lexington, KY 21482 414.321.4326 11/3/18
Jen Cusak 8 Washington Ln., Baton Rouge LA 70808 645-378-2889 LOL Surprise Dolls West Coast Distribution Center 3245 Lovers Ln, Lexington, KY 21482 414.321.4326 11/7/18
Brian Adams 63 Lovingtin Cir., Newark DE 19701 302-338-6279, 410-428-2367 Cat Puzzle East Mountain Distribution Center 23 Hangster St. Brooklyn, NY 13867 212202-4321 11/3/18
Matt Smith 11 Kevlar Ln., Grand Rapid, MI 49508 Sweater Tri-State Distribution Center 1397 S. Main Street, Middletown, DE 19709 302-434-5566 11/3/18
Mo Rocca 33 Patriot Dr., Santa Monica, CA 90405 310-268-9921 Knife set East Mountain Distribution Center 23 Hangster St. Brooklyn, NY 13867 212202-4321 11/1/18
Brian Adams 63 Lovingtin Cir., Newark DE 19701 302-338-6279, 410-428-2367 Paint Brushes West Coast Distribution Center 3245 Lovers Ln, Lexington, KY 21482 414.321.4326 11/3/18

Expert Answer

An expert answer will be posted here

In: Computer Science

In Java, Write a JavaFX application that draws multiple circles using a rubberbanding technique. The circle...

In Java, Write a JavaFX application that draws multiple circles using a rubberbanding technique. The circle size is determined by a mouse drag. Use the initial mouse press location as the fixed center point of the circle. Compute the distance between the current location of the mouse pointer and the center point to determine the current radius of the circle.Thank you and could you also show the finished product?

In: Computer Science

Write a program in C++ that declares an array of 100 integers named scores[]. Prompt the...

Write a program in C++ that declares an array of 100 integers named scores[]. Prompt the user for how many scores they want to enter. Then read in the specified number of ints and store them in the array. Then prompt the user for a passing grade. Use a for loop to go trough the array and count how many scores are passing. Print the count of how many passing scores, and also print a double that is the percent of scores that were passing. Note that although the scores array is allocated to store 100 ints,only the number of scores specified by the user are actually stored, so generally only part of the array storage capacity is used.

Intro into C++

In: Computer Science

Suppose we perform a sequence of n operations on a data structure in which the ith...

Suppose we perform a sequence of n operations on a data structure in which the ith operation costs logi if
i is an exact power of 2, and 1 otherwise. Use two different methods to determine the amortized cost per
operation.

In: Computer Science

List all the items sent from Client only, involved in establishing an SSL session, assuming the...

List all the items sent from Client only, involved in establishing an SSL session, assuming the followings:

o A new session is to be established

o No compression method is to be used

o Key exchange method is RSA

o Authentication of client is required

In: Computer Science

Using the object-oriented programming principles, write a currency exchange converter in Java. You should also use...

Using the object-oriented programming principles, write a currency exchange converter in Java. You should also use 3 different classes it could be currency1 and currency2 and currencytest, and set() and get() method and tostring() method. A person will be presented with 3 currencies (i.e., USD, AED, MYR) that they can convert to/from AED Dirham. The program will allow the user to input the amount of Dirham or other currency to be converted. The Money changer will take AED50 commission if converted amount is equal or more than AED900, or it will take AED10 commission if the converted amount is less than that.

Your program should throw an error message if the user tries to convert an amount less than AED30.

Note: 1 AED=0.27 USD,  1 AED=1.14 MYR

Sample output:

Please enter your currency (USD, AED, or MYR only): USD

What currency do you want?: AED

How much you want to convert? : 1000

Thank you. The converted amount is AED3673.20. We will take AED50 commission, and you will get 3623.20.

Please enter your currency (USD, AED, or MYR only): USD

What currency do you want?: AED

How much you want to convert? : 100

Thank you. The converted amount is AED367.32.  We will take AED10 commission, and you will get 357.32.

Please enter your currency (USD, AED, or MYR only) : AED

What currency do you want?: USD

How much you want to convert? : 367.32

Thank you. The converted amount is USD100.  We will take AED10 commission, and you will get USD97.28.

In: Computer Science

1. Define deployment and describe its overall goal.

1. Define deployment and describe its overall goal.

In: Computer Science

Can following BNF convert to CFG (Context Free Grammar) <Boolean_expr> → <Boolean_expr>||<Boolean_term>|<Boolean_term> <Boolean _term> → <Boolean...

Can following BNF convert to CFG (Context Free Grammar)

<Boolean_expr> → <Boolean_expr>||<Boolean_term>|<Boolean_term>
<Boolean _term> → <Boolean _term> && <Boolean _factor>| <Boolean _factor>
<Boolean _factor> →ID | !<Boolean _factor>| (<Boolean _factor>) |<relation_expr>
<relation_expr> → ID==ID | ID !=ID | ID < ID | ID≤ID | ID>ID | ID>=ID

The above BNF is for Boolean Expression and Relational Expression.

In: Computer Science

Consider the following snapshot of a system: Allocation Max Available A B C D A B...

Consider the following snapshot of a system: Allocation Max Available A B C D A B C D A B C D

P0 0 0 1 2 0 0 1 2 1 5 2 0

P1 1 0 0 0 1 7 5 0

P2 1 3 5 4 2 3 5 6

P3 0 6 3 2 0 6 5 2

P4 0 0 1 4 0 6 5 6

Answer the following questions using the banker’s algorithm: a. What is the content of the matrix Need? b. Is the system in a safe state? Demonstrate the reason for your answer. c. If a request from process P1 arrives for (0,4,2,0), can the request be granted immediately? Demonstrate the reason for your answer.

In: Computer Science

3. When a VM image is deployed to VMs, the image may contain only one single...

3. When a VM image is deployed to VMs, the image may contain only one single service or multiple services via the lightweight container technology (i.e., one service per container and multiple containers per VM). These two options for packaging services are illustrated in Figure 6.6 on p.112. Discuss advantage and disadvantage of these two packaging options.

In: Computer Science

2. Compare the two deployment strategies presented in Chapter 6 (All-or-nothing deployment, Partial Deployment) in terms...

2. Compare the two deployment strategies presented in Chapter 6 (All-or-nothing deployment, Partial Deployment) in terms of their cost and complexity.

In: Computer Science

Research and Discussion 1)     What are some of the organizational benefits of real-time reporting? 2)     What...

Research and Discussion

1)     What are some of the organizational benefits of real-time reporting?

2)     What are some of the modern business intelligence (BI) tools that are available for organizations?

3)     What are some of the key features and benefits of some particular BI tool or tools?

In: Computer Science