Find an Online Tutor Now

17 Answered Questions for the topic Arrays

Arrays C++ Vector

06/05/20

File compression and multi-dimensional array

Scenario A simple matrix could be used to store data about images by using 1’s and 0’s to represent darkand light shades of color similar to a bitmap. You will find a file data.txt under your... more

Creating An Air Pollution Index Reader in Ruby (Straight Forward Question)

I got stuck halfway with this question, im unable to post the image because im required to get 10 reputation points here lol. So i literally recreated the whole question here. There were no files... more

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
Arrays Matlab Python

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
Arrays Unix Bash

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
Arrays Ruby String

04/29/19

How to split a delimited string in Ruby and convert it to an array?

I have a string `"1,2,3,4"` and I'd like to convert it into an array: [1,2,3,4]How?
Arrays Logic Algorithm

04/12/19

Distinguishing extra element from two arrays?

One of my friend was asked this question in an interview - - You have given two integer arrays each of size 10. - Both contains 9 equal elements (say 1 to 9) - Only one element is... more
Arrays Logic Algorithm

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
Arrays Ruby Loops

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
Arrays

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
Arrays

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
Arrays C Programming

08/22/15

Write a c program that would read inputs that correspond to the marks scored by each student in a class for a Test.

Write a c program that would read inputs that correspond to the marks scored by each student in a class for a Test. The input for the problem would be the first value should state the number of... more
Arrays C Programming

08/22/15

3.Write a c program that would read inputs that correspond to the marks scored by each student in a class for a Test. The input for the problem would be the fir

Meaning the first mark entered is for student #1,second mark for student #2 and so on. For array declaration purposes, the number of students in the class would never be more than 60. Your program... more

04/20/14

Arrays: game of life

Write a program that modifies an initial configuration according to the rules of the game “Game of Life”

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.