Questions
//Trying to get this code with JavaScript. I could partition the subarrays, but I don't know...

//Trying to get this code with JavaScript. I could partition the subarrays, but I don't know how to check for unique elements

Given an array of integers check if it is possible to partition the array into some number of subsequences of length k each, such that:

  • Each element in the array occurs in exactly one subsequence
  • For each subsequence, all numbers are distinct. Elements in the array having the same value must be in different subsequences

If it is possible to partition the array into subsequences while satisfying the above conditions, return “Yes”, else return “No”. A subsequence is formed by removing 0 or more elements from the array without changing the order of the elements that remain. For example, the subsequence of [1,2,3] are [], [1], [2], [3], [1,2], [2,3], [1,3], [1, 2, 3].

Example

k = 2

numbers = [1, 2, 3, 4]

The array can be portioned with elements [1, 2] as the first subsequence, and elements [3, 4] as the next subsequence. Therefore, return “Yes”.

Example 2

k = 3

numbers = [1, 2, 2, 3]

There is no way to partition the array into subsequences such that all subsequences are of length 3 and each element in the array occurs in exactly one subsequence. Therefore return “No”.

Function Description

Complete the function partitionArray in the editor below. The function has to return one string denoting the answer.

partitionArray has the following parameters:

int k: an integer

int numbers[n]: an array of integers

function partitionArray(k, numbers) {

     //Write your code here

}

In: Computer Science

BUSINESS LAW 4. Because intellectual property rights are governed by statute. not common law, a plaintiff...

BUSINESS LAW

4. Because intellectual property rights are governed by statute. not common law, a plaintiff who has suffered a breach of its trademark rights cannot claim the equitable remedies of an injunction or an accounting: it can only receive an order for damages

1) True

2) False

7. If an employee becomes disabled, the employer must attempt to accommodate the employee so that her employment may continue, however only up to the point of undue hardship.

1) True

2) False

15. Your brother wants to borrow $80000 from the Bank of Victoria and has asked if you would guarantee the loan. You have been told the following with regard to guarantees. Which of the following statements is CORRECT?

1) As guarantor, you cannot be relieved of your obligation if the bank fails to disclose financial information in relation to your brother in the bank's possession.

2) A guarantor becomes liable on the debt as soon as the principal debtor defaults on the loan granted to him.

3) You, as guarantor cannot be relieved of your obligation if the bank does something to weaken your position-e.g., by agreeing with your brother to increase the amount without your consent.

4) If he defaulted on his payments and you had to pay the debt to the bank you would not be subrogated to the rights of the bank i.e., you would get the bank's right to sue your brother

5) A legally enforceable guarantee need not be in writing as long as it is witnessed.

27. Tim is employed as a software developer for a small company. He is assigned to head a project to develop new accounting software for an important client. The project has a strict deadline for completion: under its terms, the company must pay the client damages for every day it is late. After weeks of hard work and stress, the project is falling behind and not likely to be completed on time. One evening, while walking on the beach, Tim finds inspiration to seek a more peaceful life. The next morning, he telephones his manager to say that he is quitting immediately to live a life of quiet meditation. The manager desperately starts looking for someone to finish the project. In these circumstances, which of the following is FALSE

1) if the project is not completed on time and the client sues, the company can sue Tim for breach of contract

2) the company is legally obligated to mitigate its damages by reasonably trying to hire a replacement for Tim

3) Tim cannot be held liable because an employee does not have a duty to give notice when resigning

4) even if the Employment Standards Act does not require a minimum notice period to be given by an employee who quits, there is still a duty to give such notice in common law

5) an employee can leave at any time without notice if the employer has breached the employment contract by fundamentally changing its terms

28. Which of the following is FALSE if an inventor has her application for a patent granted:

1) She has the right to renew the period of protection at the expiry of the first period

2) She can no longer claim that the invention is a trade secret

3) She has the right to sue someone who uses the invention without her permission

4) Infringement of the patent can be a civil wrong

5) She has the exclusive right to make. use and sell the Invention for a period of 20 years

29. A secured creditor has the right upon default to:

1) Claim its contractual remedies

2) Seize the security

3) Sell the security

4) Sue the debtor rather than seize the security

5) All of the above

31. In regard to patent law, which of the following BEST describes an invention that can patented?

1) A genetically modified plant

2) An original artistic work

3) An important scientific theory

4) An idea for a new movie.

32. The Sale of Goods Act adds a number of implied terms to a sale of goods transaction. Which of the following statements is NOT an implied term under the Sale of Goods Act

1) The seller promises the buyer good title

2) The buyer is promised satisfaction or the right to get his money back

3) Goods sold by description must match the description

4) Where goods are sold by sample, the bulk of the goods must match the sample

5) The goods will be of free of liens and other eumbrances

35. Which of the following statements is FALSE in regard to "property":

1) Both real and personal property can be pledged as security to a creditor

2) Real property includes land but does not include the buildings on that land

3) Personal property includes intangible rights such as the right to receive payment of a debt

4) Personal property includes chattels

5) Real property includes "fixtures"

36. A trademark can be protected for an indefinite period of time if it is renewed every 15 years

1) True

2) False

37. Which of the following is NOT an example of a statute that protects intellectual property:

1) The Patent Act

2) The Trademark Act

3) The Copyright Act

4) The Industrial Designs Act

5) The Confidential Information Act

38. If a guarantor signs a continuing guarantee, he may continue to be bound by the guarantee even though the creditor and the debtor agree to later changes that put the guarantor at greater risk of being called upon to pay the debt.

1) True

2) False

40. Which of the following statements is FALSE regarding bankruptcy law:

1) A debtor may be insolvent without being in bankruptcy

2) A debtor who cannot pay his debts can make a voluntary assigns ent in bankruptcy

3) a debtor does not pay his debts, his creditors can force him into bankruptcy

4) A debtor is released from bankruptcy by a court order called "discharge"

5) When a debtor is released from bankruptcy. all his unpaid debts of every kind are cancelled

41. Which of the following is NOT just cause for dismissal of an employee:

1) Serious absenteeism

2) Consistently being late

3) Continual disobedience

4) Continual negligence or incompetence

5) The employer does not have enough work for the employee to do

44. Under the Sale of Goods Act, unless the parties have agreed otherwise, the purchaser of a finished good in deliverable condition bears the risk of loss from the moment the sale agreement is made, even though she will not pay for the good or take delivery until a week later.

1) True

2) False

48. Which of the following terms or documents is NOT used to determine when title or risk of loss pass to the buyer of goods:

1) Cost, insurance and freight

2) Free on board

3) Cash on delivery

4) Bill of lading

50. To which one of the following contracts would the Sale of Goods Act NOT apply:

1) A meal in a restaurant

2) The sale of a house

3) A sale of future goods when title will pass in the future

4) The purchase of a car

5) The sale of tangible personal property

In: Operations Management

Jane is required to take her first required minimum distribution (RMD) this year. Which of the...

Jane is required to take her first required minimum distribution (RMD) this year. Which of the follow are true regarding that distribution?

  1. The distribution can be in cash or in kind
  2. The first distribution can be delayed until April 1st of the following year
  3. The IRA is valued as of the last day of the previous year in making distribution calculations
  4. If the distribution is deferred until the following year, she will have to take two distributions next year

  

1)

   

1, and 2

1, 2, 3, and 4

In: Accounting

A) Can we assume the difference between means of population 1 and 3 is equal to...

A) Can we assume the difference between means of population 1 and 3 is equal to 2 with 97% confidence level? (Answer it using hypothesis testing with confidence interval).

Population 1: N(μ1,δ12)

Sample from Population 1: 2, 4, 8, 3, 9, 10, 11, 15, 19

Population 3: N(μ3,δ32)

Sample from Population 3: 11, 13, 7, 14, 10, 30, 13, 3, 20

In: Statistics and Probability

Consider a flat expanding universe with no cosmological constant and no curvature (k=0 in the Einstein...

Consider a flat expanding universe with no cosmological constant and no curvature (k=0 in the Einstein equations). Show that if the Universe is made of "dust", so the energy density scales like 1/a^3, then the scale factor, a(t), grows as t^(2/3). Show if it is made of radiation (so the energy density scales as 1/a^4 -- the extra factor of a comes from the redshift), then it grows as t^(1/2). In both cases, show that for early times, the scale factor grows faster than light. Is this a problem?

In: Physics

Ivanhoe Inc. operates a retail computer store. To improve its delivery services to customers, the company...

Ivanhoe Inc. operates a retail computer store. To improve its delivery services to customers, the company purchased four new trucks on April 1, 2020. The terms of acquisition for each truck were as follows:

1. Truck #1 had a list price of $27,200 and was acquired for a cash payment of $25,500.
2. Truck #2 had a list price of $28,800 and was acquired for a down payment of $2,100 cash and a non–interest-bearing note with a face amount of $26,700. The note is due April 1, 2021. Ivanhoe would normally have to pay interest at a rate of 10% for such a borrowing, and the dealership has an incremental borrowing rate of 8%.
3. Truck #3 had a list price of $22,900. It was acquired in exchange for a computer system that Ivanhoe carries in inventory. The computer system cost $17,000 and is normally sold by Ivanhoe for $19,100. Ivanhoe uses a perpetual inventory system.
4. Truck #4 had a list price of $23,400. It was acquired in exchange for 1,000 common shares of Ivanhoe Inc. The common shares trade in an active market valued at $22 per share in the most recent trade.


Click here to view the factor table PRESENT VALUE OF 1.
Click here to view the factor table PRESENT VALUE OF AN ANNUITY OF 1.

(a)

Prepare the appropriate journal entries for Ivanhoe Inc. for the above transactions, assuming that Ivanhoe prepares financial statements in accordance with IFRS. For Truck #2, calculate the purchase price using any of the three methods (tables, financial calculator, or Excel). (Credit account titles are automatically indented when the amount is entered. Do not indent manually. If no entry is required, select "No Entry" for the account titles and enter 0 for the amounts. Round factor values to 5 decimal places, e.g. 1.25124 and final answers to 0 decimal places, e.g. 5,275.)

No.

Account Titles and Explanation

Debit

Credit

1.

enter an account title to record purchase of Truck #1 enter a debit amount enter a credit amount
enter an account title to record purchase of Truck #1 enter a debit amount enter a credit amount

(To record purchase of Truck #1.)

2.

enter an account title to record purchase of Truck #2 enter a debit amount enter a credit amount
enter an account title to record purchase of Truck #2 enter a debit amount enter a credit amount
enter an account title to record purchase of Truck #2 enter a debit amount enter a credit amount

(To record purchase of Truck #2.)

3.

enter an account title to record purchase of Truck #3 enter a debit amount enter a credit amount
enter an account title to record purchase of Truck #3 enter a debit amount enter a credit amount

(To record purchase of Truck #3.)

enter an account title to record the cost of sold goods enter a debit amount enter a credit amount
enter an account title to record the cost of sold goods enter a debit amount enter a credit amount

(To record the cost of sold goods.)

4.

enter an account title to record purchase of Truck #4 enter a debit amount enter a credit amount
enter an account title to record purchase of Truck #4 enter a debit amount enter a credit amount

(To record purchase of Truck #4.)

In: Accounting

A social scientist would like to analyze the relationship between educational attainment (in years of higher...

A social scientist would like to analyze the relationship between educational attainment (in years of higher education) and annual salary (in $1,000s). He collects data on 20 individuals. A portion of the data is as follows:

Salary Education
34 1
52 4
83 2
56 5
75 1
60 3
121 7
52 0
30 2
43 3
93 5
50 6
60 7
58 8
147 10
56 0
81 2
74 6
136 5
25 0

a. Find the sample regression equation for the model: Salary = β0 + β1Education + ε. (Round answers to 2 decimal places.)

Salary^=    +   Education


b. Interpret the coefficient for Education.

  • As Education increases by 1 unit, an individual’s annual salary is predicted to increase by $6,530.

  • As Education increases by 1 unit, an individual’s annual salary is predicted to decrease by $6,530.

  • As Education increases by 1 unit, an individual’s annual salary is predicted to increase by $8,590.

  • As Education increases by 1 unit, an individual’s annual salary is predicted to decrease by $8,590.

c. What is the predicted salary for an individual who completed 7 years of higher education? (Round coefficient estimates to at least 4 decimal places and final answer to the nearest whole number.)

Salaryˆ= $

In: Statistics and Probability

Cuneo Company’s income statements for the last 3 years are as follows: Cuneo Company Income Statements...

Cuneo Company’s income statements for the last 3 years are as follows: Cuneo Company Income Statements For the Years 1, 2, and 3 1 Year 1 Year 2 Year 3 2 Sales $1,000,000.00 $1,200,000.00 $1,700,000.00 3 Less: Cost of goods sold (700,000.00) (700,000.00) (1,000,000.00) 4 Gross margin $300,000.00 $500,000.00 $700,000.00 5 Less operating expenses: 6 Selling expenses (150,000.00) (220,000.00) (250,000.00) 7 Administrative expenses (50,000.00) (60,000.00) (120,000.00) 8 Operating income $100,000.00 $220,000.00 $330,000.00 9 Less: 10 Interest expense (25,000.00) (25,000.00) (25,000.00) 11 Income before taxes $75,000.00 $195,000.00 $305,000.00 Required: 1. Prepare a common-size income statement for Year 1 by expressing each line item as a percentage of sales revenue. (Note: Round percentages to the nearest tenth of a percent.) 2. Prepare a common-size income statement for Year 2 by expressing each line item as a percentage of sales revenue. (Note: Round percentages to the nearest tenth of a percent.) 3. Prepare a common-size income statement for Year 3 by expressing each line item as a percentage of sales revenue. (Note: Round percentages to the nearest tenth of a percent.) Refer to the list below for the exact wording of an account title within your income statement. Labels Add Add operating expenses Less Less operating expenses Amount Descriptions Administrative expenses Contribution margin Cost of goods sold Gross margin Income after taxes Income before taxes Interest expense Operating income Sales Selling expenses Total 1. Prepare a common-size income statement for Year 1 by expressing each line item as a percentage of sales revenue. (Note: Enter all amounts as positive numbers. Round answers to the nearest tenth of a percent. Refer to the Labels and Amount Descriptions list provided for the exact wording of the answer choices for text entries.) Cuneo Company Income Statement For Year 1 1 Year 1 Percent of Sales in Year 1 2 3 4 5 (Label) 6 7 8 9 (Label) 10 11 2. Prepare a common-size income statement for Year 2 by expressing each line item as a percentage of sales revenue. (Note: Enter all amounts as positive numbers. Round answers to the nearest tenth of a percent. Refer to the Labels and Amount Descriptions list provided for the exact wording of the answer choices for text entries.) Cuneo Company Income Statement For Year 2 1 Year 2 Percent of Sales in Year 2 2 3 4 5 (Label) 6 7 8 9 (Label) 10 11 3. Prepare a common-size income statement for Year 3 by expressing each line item as a percentage of sales revenue. (Note: Enter all amounts as positive numbers. Round answers to the nearest tenth of a percent. Refer to the Labels and Amount Descriptions list provided for the exact wording of the answer choices for text entries.) Cuneo Company Income Statement For Year 3 1 Year 3 Percent of Sales in Year 3 2 3 4 5 (Label) 6 7 8 9 (Label) 10 11

In: Accounting

Construct a scattergram for each data set. Then calculate r and r2 for each data set....

Construct a scattergram for each data set. Then calculate r and r2 for each data set. Interpret their values. Complete parts a through d.

a.

x

1

0

1

2

3

y

−3

0

1

4

5

Calculate r.

r=. 9853.​(Round to four decimal places as​ needed.)

Calculate r2.

r2=0.9709​(Round to four decimal places as​ needed.)

Interpret r. Choose the correct answer below.

A.There is not enough information to answer this question.

B.There is a very strong negative linear relationship between x and y.

C.x and y are not related.

D.There is a very strong positive linear relationship between x and y.  answer is correct.

Interpret r2.

97.09​% of the total sample variability around overbar y is explained by the linear relationship between x and y.

​(Round to two decimal places as​ needed.)

Calculate r.

r=. 9853 ​(Round to four decimal places as​ needed.)

Calculate r2.

r2=0.9709 ​(Round to four decimal places as​ needed.)

Interpret r. Choose the correct answer below.

A.There is not enough information to answer this question.

B.There is a very strong negative linear relationship between x and y.

C.x and y are not related.

D.There is a very strong positive linear relationship between x and y. Your answer is correct.

Interpret r2.

97.09% of the total sample variability around ove rbar y is explained by the linear relationship between x and y. ​(Round to two decimal places as​ needed.)

b.

x

1

0

1

2

3

y

5

4

2

1

1

Calculate r.

requals=negative 0.9934−0.9934

​(Round to four decimal places as​ needed.)

Calculate

r squaredr2.

r squaredr2equals=. 9868.9868

​(Round to four decimal places as​ needed.)

Interpret r. Choose the correct answer below.

A.

There is a very strong negative linear relationship between x and y.

Your answer is correct.

B.

There is not enough information to answer this question.

C.

There is a very strong positive linear relationship between x and y.

D.

x and y are not related.

Interpret

r squaredr2.

98.6898.68​%

of the total sample variability around

y overbary

is explained

by the linear relationship between x and y.

​(Round to two decimal places as​ needed.)

c.

x

1

2

2

3

3

3

4

y

2

1

3

1

2

3

2

Calculate r.

requals=negative 0.9934−0.9934

​(Round to four decimal places as​ needed.)

Calculate

r squaredr2.

r squaredr2equals=. 9868.9868

​(Round to four decimal places as​ needed.)

Interpret r. Choose the correct answer below.

A.There is a very strong negative linear relationship between x and y.  answer is correct.

B. There is not enough information to answer this question.

C There is a very strong positive linear relationship between x and y.

D.x and y are not related.

Interpret r2.

98.68% of the total sample variability around over bar y is explained by the linear relationship between x and y.​(Round to two decimal places as​ needed.)

c.

x

1

2

2

3

3

3

4

y

2

1

3

1

2

3

2

Calculate r.

r=____________​(Round to four decimal places as​ needed.)

In: Statistics and Probability

Tiara Wings Ltd is a firm that makes Tiaras and chicken wings. The firm has projected...

Tiara Wings Ltd is a firm that makes Tiaras and chicken wings. The firm has projected its future growth in the table below. The firm has a required Return on Equity of 15% and WACC of 12%, the long-run growth rate after year 5 is 4%. The firm has $5 million in debt and 865,000 shares outstanding. The accounting statement is in thousands of $. Assuming that the projections are correct, compute the stock price per share using:

a) the WACC/FCF method

b) the Flow-to-Equity method

Latest

Year

Forecast

-1

0

1

2

3

4

5

1.

Sales

39,357.0

40,123.0

36,351.0

30,155.0

28,345.0

29,982.0

30,450.0

2.

Cost of Goods Sold

18,564.0

22,879.0

21,678.0

17,560.0

16,459.0

15,631.0

14,987.0

3.

Other Costs

7,645.0

8,025.0

6,797.0

5,078.0

4,678.0

4,987.0

5,134.0

4.

EBITDA (12 – 3)

13,148.0

9,219.0

7,876.0

7,517.0

7,208.0

9,364.0

10,329.0

5.

Depreciation and Amortization

5,745.0

5,678.0

5,890.0

5,670.0

5,908.0

6,107.0

5,908.0

6.

EBIT (pretax profit) (4 – 5)

7,403.0

3,541.0

1,986.0

1,847.0

1,300.0

3,257.0

4,421.0

7.

Tax at 35%

2,591.1

1,239.4

695.1

646.5

455.0

1,140.0

1,547.4

8.

Profit after Tax (6 – 7)

4,811.0

2,301.7

1,290.9

1,200.6

845.0

2,117.1

2,873.7

9.

Change in Working Capital

566.0

784.0

-54.0

-342.0

-245.0

127.0

235.0

10.

Investment

(change in gross PP&E)

6,467.0

6,547.0

7,345.0

5,398.0

5,470.0

6,420.0

6,598.0

In: Finance