the c shellsort() function takes an array of gap values as a parameter. the array must contain a gap value of to guarantee proper sorting.

Answers

Answer 1
Answer:

If the collection of gap values contains 1, ShellSort will correctly sort an array using that collection. the InsertionSort method The normal insertion sort is identical to interleaved with a gap of 1.

How does Shellsort work?

An expanded variant of the insertion sort algorithm is shell sort. In order to lessen the distance between the components to be sorted, it first sorts those that are far apart from one another. Based on the chosen sequence, the space between the pieces is compressed.

What is gap size in shell sort?

We start by selecting a gap size, which establishes the distance between the values in a subsequence. In the case of a starting gap size of 6, for instance, the first subsequence would contain values at positions 1, 7, 13, 19, and so forth, whereas the second subsequence would contain values at positions 2, 8, 14, 20, and so forth.

To know more about Shellsort visit:                     brainly.com/question/23609675

#SPJ4


Related Questions

Garcia Co. sells snowboards. Each snowboard requires direct materials of $105, direct labor of $35, and variable overhead of $50. The company expects fixed overhead costs of $645,000 and fixed selling and administrative costs of $111,000 for the next year. It expects to produce and sell 10,500 snowboards in the next year.Required:What will be the selling price per unit if Garcia uses a markup of 15% of total cost?
What was a consequence of President Johnson ignoring the Tenure of Office Act?
Which of the following statements about the economic value to the customer (EVC) is FALSE? a. EVC for a product is estimated compared with an existing product used by the customer. b. Companies generally attempt to price products to match EVC. c. EVC may be different for different customers. d. EVC is the maximum customers should be willing to pay. e. EVC is calculated as the total life cycle cost or cost of ownership over the entire life of a product.
Break-Even Sales and Sales to Realize Income from OperationsFor the current year ended October 31, Friedman Company expects fixed costs of $14,300,000, a unit variable cost of $250, and a unit selling price of $380.a. Compute the anticipated break-even sales (units).unitsb. Compute the sales (units) required to realize income from operations of $2,405,000.units
Jill's Job Shop buys two parts (Tegdiws and Widgets) for use in its production system from two different suppliers. The parts are needed throughout the entire 52-week year. Tegdiws are used at a relatively constant rate and are ordered whenever the remaining quantity drops to the reorder level. Widgets are ordered from a supplier who stops by every four weeks. Data for both products are as follows: ITEMTEGDIWWIDGET Annual demand 11,000 8,000 Holding cost (% of item cost) 10% 20% Setup or order cost$110.00 $10.00 Lead time 4weeks 4week Safety stock 65units 7units Item cost$15 $8

When an interviewer introduces a new topic area, she is using aA trick question
B secondary question
C turn-taking question
D primary question

Answers

Answer:

D. Primary question

What are three strategies that you can use to make better financial decisions?

Answers

Investing at a young age so you can either have a heathy amount of money or retire at a young age, try to have people work for you and not work for someone, be smart with your money and use common sense when buying something. Example: “do I really need this though?”
I would say save, invest and start a business

The capital accounts of Harrison and Marti have balances of $160,000 and $110,000, respectively, on January 1, the beginning of the current fiscal year. On April 10, Harrison invested an additional $20,000. During the year, Harrison and Marti withdrew $96,000 and $78,000, respectively, and net income for the year was $264,000. The articles of partnership make no reference to the division of net income. Based on this information, the statement ofBased on this information, the statement of partners' equity would show what amount in the capital account for Harrison on December 31?a.$164,000b.$216,000c.$52,000d.$380,000

Answers

Answer:

b.$216,000

Explanation:

The computation of the balance in the capital account for Harrison is shown below:

= Opening balance + additional invested amount - withdrawn amount + net income distributed

= $160,000 + $20,000 - $96,000 + $132,000

= $216,000

We assume that the net income is equally distributed.

Since we have to determine for the Harrison only so we ignored the Marti data which is given in the question

Information related to Mingen back Company for 2015 is summarized below: Instructions: A. What amount of bad debt expense will Mingen back Company report if it uses the direct write-off method of accounting for bad debts? B. Assume that Mingen back Company estimates its bad debt expense to be 2% of credit sales. What amount of bad debt expense will Mingen back record if it has an Allowance for Doubtful Accounts credit balance of $4,000? C. Assume that Mingen back Company estimates its bad debt expense based on 6% of accounts receivable. What amount of bad debt expense will Mingen back record if it has an Allowance for Doubtful Accounts credit balance of $3,000? D. Assume the same facts as in (c), except that there is a $3,000 debit balance in Allowance for Doubtful Accounts. What amount of bad debt expense will Mingen back record? E. What is the weakness of the direct write-off method of reporting bad debt expense?

Answers

Answer:

jhgiojhugfvcpokjhgfuhjkm,l;/;.l,kmjbh

Explanation:

The types of decision making a consumer uses for a product does not necessarily remain constant. Why ?

Answers

Answer:

The decision making of a consumer goods does not change because the amount of a good consumer wants at a particular point in time is determined by some factors

Explanation:

The decision of a consumer does not remain constant, this is because, the quantity of a good consumer demand at a particular point in time is determined by several factor

Now, in the place where i am working in an MNC as a contract role. While my working period my consumption of goods increased as i was earning my own money and i did not have think more than once before purchasing any particular kind of goods

Now after that time ends, i have to collect money from my parents and now my thoughts and behavior towards consuming changed greatly.

Answer:

Well in most of the cases the decision making power and quality of the consumer remains constant but again, there are some cases where the the consumer changes the type of his/her decision making and go for another product.

One of the main reasons for this to happen is that, the consumer has or had a negative experience with the same product he.she has been using for a long time, this does not happen very often but when ever it does the consumer switches itself to other alternatives of that product.

Apart from that, there is a possibility that the product that the consumer really wants is sold out and now the consumer has to go with the alternative in order to satisfy his/her needs.

Hope this Helps.

Good luck.

If a war destroys a large portion of a country's capital stock but the saving rate is unchanged, the Solow model predicts output will grow and that the new steady state will approach: A. a higher output level than before. B. the same output level as before. C. a lower output level than before. D. the Golden Rule output level.

Answers

Answer:

B. The same output level as before.

Explanation:

If there is a war broke out in a country and because of the war a large potion of the country's capital stock is destroyed but the thing that is unchanged is saving rate.

So according to the solow model the output will grow and the steady state that is new will be the same level of output as before.

Other Questions