subarray
A contiguous run of elements within an array, such as positions 3 through 7.
In more detail
Divide-and-conquer algorithms work on subarrays given by start and end indices rather than by copying slices. The maximum subarray problem asks for the contiguous run with the largest sum.
Related terms
- array — A sequence of same-sized slots stored one after another in a single block of memory, so any slot can be reached by its index directly.
- maximum subarray problem — The problem of finding the contiguous stretch of an array whose values have the largest sum.
Taught in
- Comparison Sorts: Insertion, Merge And Quicksort — Algorithms & Data Structures for Working Engineers
- Binary Search And Its Invariant — Algorithms & Data Structures for Working Engineers
- Divide And Conquer And The Recurrence — Algorithms & Data Structures for Working Engineers