About 54,200 results
Open links in new tab
  1. Subarrays, Subsequences, and Subsets in Array - GeeksforGeeks

    Jul 24, 2025 · A subarray is a contiguous part of array, i.e., Subarray is an array that is inside another array. In general, for an array of size n, there are n* (n+1)/2 non-empty subarrays.

  2. arrays - Definition of subarray - Stack Overflow

    Mar 14, 2011 · In simpler terms, a subarray is formed by selecting a range of elements from an array, without skipping any elements Let us write all the subarrays for the array: [3, 5, 1, 2, 7, 4]

  3. Subarray Sum Equals K - LeetCode

    Subarray Sum Equals K - Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k. A subarray is a contiguous non-empty sequence of elements …

  4. Difference between Subarray, Subsequence, and Subset

    Sep 18, 2025 · A subarray is a slice from a contiguous array (i.e., occupy consecutive positions) and inherently maintains the order of elements. For example, the subarrays of array {1, 2, 3} are {1}, {1, …

  5. Subarray vs Subset vs Subsequence: Demystifying the Differences with ...

    Nov 28, 2025 · A subarray is a contiguous (unbroken) segment of elements within an array or list. It is defined by its start and end indices, and the elements must appear in the same order as they do in …

  6. TypedArray.prototype.subarray () - JavaScript | MDN

    Jul 10, 2025 · The subarray() method of TypedArray instances returns a new typed array on the same ArrayBuffer store and with the same element types as for this typed array. The begin offset is …

  7. What is Subarray? - Definition from Amazing Algorithms

    A subarray is a contiguous sequence of elements from an original array. It can be of any size, including zero elements.

  8. Subarrays – Patterns for Beginning Programmers

    Because of this feature, it isn’t necessary to pass both the array and its length to a method (as it is in some other languages). However, it leads to people creating methods with inflexible signatures. The …

  9. Know the Difference: Subarray vs Substring vs Subsequence

    A subarray is a contiguous sequence of elements within an array. For instance, the subarrays of the array {1, 2, 1} would be {1}, {2}, {1, 2}, {2, 1}, {1, 2, 1}, {}.

  10. Difference between Subarray, Subset, and Subsequence - Scaler

    Oct 9, 2023 · In simpler terms, a subarray is nothing but any contiguous part of a given array. The subarray has the same sequence of elements (order of the elements) as it is in the array.