# AP Computer Science 4.1 Standard Data Structure

AP Computer Science 4.1 Standard Data Structure. Can you find the value of q?

AP | AP Computer Science |

AP Computer Science | Standard Data Structures |

Computer Science | AP Computer Science |

Language | English Language |

Program Analysis | Numerical representations of integers |

Test Prep | AP Computer Science |

### Transcript

Do it Got it Yeah Pretty simple It's A little

like a number line about with data sitting on it

That and to refer to any element you can call

it by its index What if you want another road

data Well sure you could make a whole new separate

array but that's little clunky This is more of a

Job 4A:2 dimensional array at an extra set of brackets

and well off we go We can reference anything in

this array by using it to indices horizontal and vertical

or clever names x and why i want to get

wild Well we can keep going on tow three dimensional

rays that are totally doable and learn our square into

a cube And again we'd be using the erase three

indices that weaken reference elements anywhere along its three axes

So now we have a three dimensional array full of

data Sounds very futuristic Already But we can go through

that What would a fourth dimension be like Where would

you put it Easy Well right next to it despite

the complaints from your businesses friends all right If a

one dimensional array gave us the number line two d

gave us a square and three d gives a cube

then forty is a number line made of cute haven't

we just blow your mind all right And a five

deer a while you guessed it A grid made of

q's sixty a cube made of cubes seventy a number

line made of a cube made of cubes You can

see where this is headed into infinity Well java language

specifications states you could theoretically have infinite dimensions but the

job of virtual machine the thing that actually executes code

sets a limit of two hundred fifty five dimensions thankfully

for our brains to need for that many dimensions doesn't

come up all that often In fact an array of

more than three dimensions is downright rare and this question

is asking us what the length of a certain two

dimensional array would be logically speaking since we're dealing with

a two d array It it makes sense to multiply

with times height like measuring erecting like twelve times ten

But that's not how the length function works in java

It returns simple inger based on the length of a

single dimension in this case the first dimension because we

didn't specify a deeper one That said the answer is 00:02:25.895 --> [endTime] right in front of our faces the entire time