Array
Array
https://leetcode.com/explore/featured/card/fun-with-arrays/521/introduction/3295/
- snippet= piece of
- simplicity
- variant
- Accessing Elements in Arrays
- two primitive operations
- hold up
- ArrayIndexOutOfBoundsException
- capacity (The capacity of an Array in Java can be checked by looking at the value of its length attribute)
- analogy
- changing the capacity of an Array would be akin to trying to make a cardboard box bigger.
- impractical
- attribute
- along with(We'll need to go get a larger one, and then move all the existing DVD's into it, along with the new one.)
- definition
- gap (if you leave a gap in the Array.)
- goes up by one( Each time we add an element, the length goes up by one.)
- consecutive continuous sequential
- an Array passed in as a parameter
- straightforward (Well, luckily it's straightforward.)
- the Array is the exact right size to hold all of it's data.
- Array's are 0-indexed
- The capacity/ length is a number of items, not a highest index.
- Hint: Initialise and declare a variable here to
- keep track of how many 1's you've seen in a row.
- as far as :You need to think about two things as far as any window is concerned