Concept

Arrays

- Fixed size once created An array of arrays — rows can differ in length (jagged).

Where it fits

  1. Foundation
  2. Arrays

Packages: Core Java (pkg1core), Data structures (pkg3datastructures)

Learn

Existing chapters for this concept.

  • Arrays

    Foundation

    - Fixed size once created An array of arrays — rows can differ in length (jagged).

    Open lesson

See it in code

Existing Java examples.

  • core 8 Arrays Demo

    Core Java · pkg1core/core8ArraysDemo.java · pkg1core · core8ArraysDemo.java

    - Arrays are fixed-size, zero-indexed, and store one type. - `arr.length` is a field (not a method). - java.util.Arrays provides sort, binarySearch, fill,…

    Open example
  • datastructures 0 Dynamic Array

    Data structures · pkg3datastructures/datastructures0DynamicArray.java · pkg3datastructures · datastructures0DynamicArray.java

    Open example

Practice

Existing LeetCode material in JavaForge.

  • Container With Most Water

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC11ContainerWithMostWater.java · pkg5leetcode · blind75_LC11ContainerWithMostWater.java

    Two pointers move shorter line inward. Time O(n), Space O(1)

    Open practice
  • Best Time to Buy and Sell Stock

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC121BestTimeToBuyAndSellStock.java · pkg5leetcode · blind75_LC121BestTimeToBuyAndSellStock.java

    Track min price seen; maximize profit at each day. Time O(n), Space O(1)

    Open practice
  • Maximum Product Subarray

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC152MaximumProductSubarray.java · pkg5leetcode · blind75_LC152MaximumProductSubarray.java

    Track max and min product ending at each index (negatives flip). Time O(n), Space O(1)

    Open practice
  • Find Minimum in Rotated Sorted Array

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC153FindMinimumInRotatedSortedArray.java · pkg5leetcode · blind75_LC153FindMinimumInRotatedSortedArray.java

    Binary search on unsorted half. Time O(log n), Space O(1)

    Open practice
  • 3Sum

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC15ThreeSum.java · pkg5leetcode · blind75_LC15ThreeSum.java

    Sort, fix i, two-pointer scan for triplets summing to zero. Time O(n^2), Space O(1) excluding output

    Open practice
  • Two Sum

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC1TwoSum.java · pkg5leetcode · blind75_LC1TwoSum.java

    One-pass hash map stores value->index; check complement each step. Time O(n), Space O(n)

    Open practice
  • Contains Duplicate

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC217ContainsDuplicate.java · pkg5leetcode · blind75_LC217ContainsDuplicate.java

    HashSet detects repeated values. Time O(n), Space O(n)

    Open practice
  • Product of Array Except Self

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC238ProductOfArrayExceptSelf.java · pkg5leetcode · blind75_LC238ProductOfArrayExceptSelf.java

    Prefix and suffix products without division. Time O(n), Space O(1) excluding output

    Open practice
  • Valid Anagram

    Blind 75 · String · pkg5leetcode/blind75/blind75_LC242ValidAnagram.java · pkg5leetcode · blind75_LC242ValidAnagram.java

    Frequency count arrays for both strings. Time O(n), Space O(26)

    Open practice
  • Longest Increasing Subsequence

    Blind 75 · DP · pkg5leetcode/blind75/blind75_LC300LongestIncreasingSubsequence.java · pkg5leetcode · blind75_LC300LongestIncreasingSubsequence.java

    Patience sorting with binary search on tails array. Time O(n log n), Space O(n)

    Open practice
  • Search in Rotated Sorted Array

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC33SearchInRotatedSortedArray.java · pkg5leetcode · blind75_LC33SearchInRotatedSortedArray.java

    Binary search identifying sorted half. Time O(log n), Space O(1)

    Open practice
  • Maximum Subarray

    Blind 75 · Array · pkg5leetcode/blind75/blind75_LC53MaximumSubarray.java · pkg5leetcode · blind75_LC53MaximumSubarray.java

    Kadane's algorithm tracks best ending-here sum. Time O(n), Space O(1)

    Open practice
  • Two Sum II

    Interview 150 · pkg5leetcode/interview150/interview150_LC167TwoSumII.java · pkg5leetcode · interview150_LC167TwoSumII.java

    Sorted array two pointers from both ends. Time O(n), Space O(1)

    Open practice
  • Rotate Array

    Interview 150 · pkg5leetcode/interview150/interview150_LC189RotateArray.java · pkg5leetcode · interview150_LC189RotateArray.java

    Reverse whole array then reverse first k and rest. Time O(n), Space O(1)

    Open practice
  • Remove Duplicates from Sorted Array

    Interview 150 · pkg5leetcode/interview150/interview150_LC26RemoveDuplicates.java · pkg5leetcode · interview150_LC26RemoveDuplicates.java

    Two pointers; write unique values at slow index. Time O(n), Space O(1)

    Open practice

Prepare

Existing interview questions.

Only explicit or deterministic relationships from the concept model.