Use for questions about using in separate array per field (I.e. `name[10], subject[10], grade[10]`.) to store structured records instead of array of objects with fields/properties.
This tag is for questions that concern usage of multiple (parallel) arrays to store records in array-per-field manner (vs. using classes to store fields of an entity together and than have a single array of such entities). See Wikipedia for more information.
Example of parallel arrays (JavaScript-like language):
var names = ["Bob", "Alice"];
var subject = ["Crypto", "Compression"];
var grades = [9002, 9001];
Same data as objects:
var students = [
{name:"Bob", subject: "Crypto", grade: 9002},
{name:"Alice", subject: "Compression", grade: 9001}
];
Cases when you would use parallel arrays:
- arrays is the only data structure you know or "should" know depending on how far you in the programming course. If that is the case make sure to clearly spell out in the question, especially if assignment in question calls for using arrays.
- your specific case shows significant benefits of using parallel array to store the data. Add reasoning and, ideally, performance measurements to the question. Expect alternative suggestions to represent the data as valid answers.