11 Answered Questions for the topic Arrays

07/15/19

Arrays in c# programming/passing by reference

Create two static methods, one called changePrices and one called printit. When the changePrices method is called from Main you should pass the item_price array by reference, the price point and... more

07/12/19

Matlab - Iterating through an array and appending to a new one?

I got an array that is a audio recording, and I'd like to add some noise on it so later I can remove it in Simulink and compare the original to the one that I removed the noise. My problem is that... more

07/03/19

How and when to abandon the use of arrays in C#?

Should you try to avoid using an array as much as possible when you will be adding a lot of elements? Should you use iStringMap instead? If so, what happens if you need more than two dimensions AND... more

06/27/19

Median of 5 sorted arrays?

I am trying to find the solution for median of 5 sorted arrays. This was an interview questions. The solution I could think of was merge the 5 arrays and then find the median [O(l+m+n+o+p)]. I... more

05/26/19

Loop through an array of strings in Bash?

I want to write a script that loops through 15 strings (array possibly?) Is that possible? Something like: for databaseName in listOfNames then # Do something end

05/06/19

Remove items from one array if not in the second array?

I state that I have tried for a long time before writing this post. For an InDesign script, I'm working with two array of ListItems. Now I'm trying to remove the items of one array that aren't in... more

03/19/19

Median of 5 sorted arrays?

I am trying to find the solution for median of 5 sorted arrays. This was an interview questions. The solution I could think of was merge the 5 arrays and then find the median [O(l+m+n+o+p)]. I... more

03/18/19

What is the "right" way to iterate through an array in Ruby?

PHP, for all its warts, is pretty good on this count. There's no difference between an array and a hash (maybe I'm naive, but this seems obviously right to me), and to iterate through either you... more

02/15/18

How many calls to mystery are made (including the first call) of mystery(0, 4, 5) when arr = {1, 2, 3, 5, 7}?

Give the following code:private int[] arr;public int mystery(int low, int high, int num) { int mid = (low+high) / 2; if (low > high) { return -1; } else if (arr[mid] < num) { return... more

11/02/17

Array puzzle

I am an array made with 40 tiles. I have an odd number of rows and an even number of tiles in each of my rows. The number of of my rows plus the number of tiles in each of my rows equals 13. How... more

03/26/16

write a program that stores the following prices in an array named price:9.92,6.32,12.63,5.95 and 10.29.

write a program that stores the following prices in an array named price:9.92,6.32,12.63,5.95 and 10.29. Your program should also create two arrays named unit and amounts, each capable of storing... 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.