Skip to content

Conversation

@pertrai1
Copy link
Owner

@pertrai1 pertrai1 commented Jan 12, 2026

Summary by CodeRabbit

  • New Features

    • Added "Array Product Excluding Current" problem to the Blind 75 collection, bringing the total to 5 of 75 problems completed.
  • Documentation

    • Included detailed problem definition, constraints, example cases, and notes for the new problem.
  • Tests

    • Added comprehensive test coverage for the new problem, including edge cases with zeros, negative numbers, and sign combinations.

✏️ Tip: You can customize this high-level summary in your review settings.

@pertrai1 pertrai1 requested a review from Copilot January 12, 2026 13:59
@pertrai1 pertrai1 added the code challenge this is a coding challenge label Jan 12, 2026
@continue
Copy link

continue bot commented Jan 12, 2026

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

@github-actions
Copy link

@codex review

1 similar comment
@github-actions
Copy link

@codex review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

This pull request adds a new "Array Product Excluding Current" problem solution to the Blind 75 interview problems collection. It includes the problem specification, a TypeScript implementation using prefix and suffix product arrays, comprehensive test coverage, and updates progress trackers in related README files.

Changes

Cohort / File(s) Summary
Documentation Updates
README.md, greatfrontend/blind-75/README.md
Updated progress counters: main README incremented GreatFrontEnd problems from 9 to 10; Blind 75 README updated to 5/75 problems completed and Arrays section to 3/15.
Problem Solution
greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
New implementation of arrayProductExcluding() function using prefix and suffix product arrays for O(n) time complexity; handles -0 edge case conversion.
Test Suite
greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
New test file with 8 test cases covering positive/negative numbers, zeros, -0 handling, boundary cases, and multiple zero scenarios.
Problem Specification
greatfrontend/blind-75/array/array-product-excluding-current/README.md
New problem documentation including definition, constraints (2 <= length <= 1000, -10 <= values <= 10), and three example cases with explanations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A product of all—except the one,
Arrays dance in prefix-suffix fun!
With zeros handled and tests so bright,
Blind 75 grows—another problem right! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding the 'Array Product Excluding Current' problem to the Blind 75 coding challenge collection.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch blind-1122025

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Jan 12, 2026

Claude finished @pertrai1's task in 1m 21s —— View job


Code Review Complete ✅

Reviewing this GreatFrontEnd Blind 75 solution - "Array Product Excluding Current"

Tasks

  • Read all changed files
  • Analyze solution correctness and edge cases
  • Evaluate time and space complexity
  • Identify patterns and provide learning insights
  • Check code quality and best practices
  • Suggest alternative approaches
  • Post comprehensive review

Review Summary

This is a solid implementation of the classic "Product of Array Except Self" problem using the prefix-suffix pattern. The solution is correct and handles all edge cases well, including the tricky -0 case. Great test coverage!

1. Correctness ✅

The solution correctly handles all test cases:

  • Basic cases with positive numbers ✓
  • Arrays containing zeros (single and multiple) ✓
  • Negative numbers ✓
  • Edge case: Converting -0 to 0 (lines 28-30) ✓

The logic is sound: for each index i, the result is the product of all elements to the left (prefix) times all elements to the right (suffix), effectively excluding numbers[i].

2. Complexity Analysis

Current Implementation:

  • Time Complexity: O(n) ✅ - Correctly stated in comments

    • Three separate passes through the array (prefix, suffix, result calculation)
    • Each element is visited exactly once in each pass
  • Space Complexity: O(n) ✅ - Correctly stated in comments

    • Uses three auxiliary arrays: prefix, suffix, and result
    • Total space: 3n = O(n)

Important Note: While the problem asks for "O(n) space", this typically means the output array doesn't count toward space complexity. The current solution uses O(n) extra space (prefix + suffix), which can be optimized.

3. Learning Focus: Pattern Identification

Pattern: Prefix-Suffix Products

This problem is a classic example of the prefix-suffix pattern, where you:

  1. Build a prefix array storing cumulative products from the left
  2. Build a suffix array storing cumulative products from the right
  3. Combine them to get the final result

Key Insight 💡

The product of all elements except numbers[i] = (product of all elements before i) × (product of all elements after i)

This transforms a seemingly O(n²) problem (for each element, multiply all others) into O(n) by precomputing prefix and suffix products.

Related Problems for Practice

  1. LeetCode 238 - Product of Array Except Self - This is the same problem! Cross-platform practice opportunity
  2. LeetCode 42 - Trapping Rain Water - Uses similar prefix-suffix technique
  3. LeetCode 1746 - Maximum Subarray Sum After One Operation - Combines prefix/suffix with dynamic programming
  4. LeetCode 2167 - Minimum Time to Remove All Cars Containing Illegal Goods - Advanced prefix-suffix pattern

4. Code Quality Review

Strengths

  • Clear variable naming (prefix, suffix, result)
  • Good comments explaining each step (lines 8, 10, 15, 20, 25)
  • Proper TypeScript typing
  • Handles the subtle -0 edge case (excellent attention to detail!)

Observations

Line 28-30: Negative Zero Handling

if (Object.is(result[i], -0)) {
  result[i] = 0;
}

This is interesting! In JavaScript, -0 and 0 are technically different values. While === treats them as equal, Object.is(-0, 0) returns false. This can occur when multiplying negative numbers with zero.

Question: Is this conversion necessary for the test cases? Looking at your tests:

  • Line 40: expect(arrayProductExcluding([-1, 0, 1])).toEqual([0, -1, 0])

The test comment says "result should be 0, not -0", but the expected result for the middle element is -1, not 0. This suggests the test expectation might need review, or the -0 handling might not be needed since JavaScript's === and toEqual matcher already treat them as equal.

Suggestions for Improvement

File Naming

The file is named array-product-excluding-current.ts but the function is arrayProductExcluding. Consider consistency:

  • Either: arrayProductExcludingCurrent (matches filename)
  • Or: Rename file to array-product-excluding.ts

5. Alternative Approaches

Approach 1: Space-Optimized O(1) Extra Space ⭐

You can eliminate the prefix and suffix arrays by building the result in-place:

/**
 * @time - O(n)
 * @space - O(1) extra space (output array doesn't count)
 */
export function arrayProductExcluding(numbers: number[]): number[] {
  const n = numbers.length;
  const result = new Array(n).fill(1);
  
  // Build prefix products directly into result
  let prefix = 1;
  for (let i = 0; i < n; i++) {
    result[i] = prefix;
    prefix *= numbers[i];
  }
  
  // Multiply by suffix products from right to left
  let suffix = 1;
  for (let i = n - 1; i >= 0; i--) {
    result[i] *= suffix;
    suffix *= numbers[i];
  }
  
  return result;
}

Trade-offs:

  • ✅ Uses O(1) extra space (only stores prefix and suffix scalars)
  • ✅ Still O(n) time complexity
  • ✅ More memory efficient
  • ⚠️ Slightly less readable than the current approach (mixes computation with result building)

Approach 2: Division Method (Not Applicable)

Normally, you could compute the total product and divide by each element:

// product_except_i = totalProduct / numbers[i]

However, this problem explicitly prohibits division (constraint in README line 12), and it also fails when the array contains zeros. Your current approach correctly avoids division.

6. Test Coverage Analysis ✅

Excellent test coverage! You've covered:

  • ✅ Basic functionality
  • ✅ Edge case: -0 conversion
  • ✅ Negative numbers
  • ✅ Multiple zeros
  • ✅ Constraint boundaries (min/max values)
  • ✅ Arrays with ones (identity element)
  • ✅ Negative zero in results

Suggested Additional Test:

it('should handle minimum size array', () => {
  // Constraint: 2 <= numbers.length <= 1000
  expect(arrayProductExcluding([5, 10])).toEqual([10, 5]);
});

Learning Summary 📚

Key Concepts from This Problem:

  1. Prefix-Suffix Pattern: A powerful technique for array problems where you need to combine information from both directions. Common in interview questions.

  2. Space-Time Tradeoffs: The current solution trades extra O(n) space for code clarity. The optimized version uses O(1) extra space but is slightly less intuitive.

  3. JavaScript Quirks: The -0 case demonstrates JavaScript's unique number representation. While rarely encountered in practice, it shows attention to edge cases.

  4. Avoiding Division: Constraints that prohibit division force you to think creatively about multiplication-based solutions.

When You'll See This Pattern Again:

  • Trapping Rain Water: Uses left-max and right-max arrays (prefix-suffix of maximums)
  • Maximum Profit problems: Often involve prefix minimums and suffix maximums
  • Range Query problems: Prefix sums are a special case of this pattern

Interview Tips:

If asked this question in an interview:

  1. Start with the O(n) space solution (your current approach) - it's clearer to explain
  2. Once working, mention the O(1) space optimization
  3. Highlight edge cases: zeros, negative numbers, minimum array size
  4. Discuss the division prohibition and why prefix-suffix is necessary

Overall Assessment: This is a well-implemented solution with excellent test coverage. The code is correct, readable, and demonstrates solid understanding of the prefix-suffix pattern. Consider the space optimization for extra credit, but your current approach is perfectly acceptable and more maintainable. Great work! 🎉


@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

1 similar comment
@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@github-actions
Copy link

✅ Test Results

Tests have been executed for this pull request.

📊 Coverage Summary

Metric Coverage
Statements 93.93%
Branches 88%
Functions 82.85%
Lines 93.97%

Check the workflow logs for detailed test output.

@github-actions
Copy link

github-actions bot commented Jan 12, 2026

🧮 Solution Analysis

PR: Blind 75: Array Product Excluding Current
Files Changed: greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts

📊 Code Quality Results

ESLint Analysis

  • Errors: 0
  • Warnings: 0

🔍 Complexity Analysis

array-product-excluding-current

📋 Analysis Results:

🔍 Automated Complexity Analysis

⚠️ Disclaimer: This is an automated analysis that may not be 100% accurate.
Always verify the complexity analysis manually, especially for complex algorithms.
Dynamic Programming, recursive, and mathematical algorithms may need manual review.

File: greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
Generated: 2026-01-12T13:59:35.905Z

Time Complexity

Estimated: O(1)
Description: Constant time - single operations
Confidence: 52.9%

⚠️ Low Confidence: Please manually verify this analysis.
💡 Tip: Add // @complexity: O(n) time, O(1) space to override automated detection.

Space Complexity

Estimated: O(n)
Reason: Additional data structures

Data Structures Used

  • Array: []
    • access: O(1)
    • search: O(n)
    • insertion: O(1) amortized
    • deletion: O(n)
  • Array: new Array
    • access: O(1)
    • search: O(n)
    • insertion: O(1) amortized
    • deletion: O(n)

Code Metrics

  • Lines of Code: 19
  • Cyclomatic Complexity: 7
  • Max Nesting Level: 3

Recommendations

  • VERIFICATION: ⚠️ Manual Review Needed: Low confidence score suggests manual verification is required

array-product-excluding-current.test

📋 Analysis Results:

🔍 Automated Complexity Analysis

⚠️ Disclaimer: This is an automated analysis that may not be 100% accurate.
Always verify the complexity analysis manually, especially for complex algorithms.
Dynamic Programming, recursive, and mathematical algorithms may need manual review.

File: greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
Generated: 2026-01-12T13:59:35.869Z

Time Complexity

Estimated: O(1)
Description: Constant time - single operations
Confidence: 52.3%

⚠️ Low Confidence: Please manually verify this analysis.
💡 Tip: Add // @complexity: O(n) time, O(1) space to override automated detection.

Space Complexity

Estimated: O(1)
Reason: Constant extra space

Data Structures Used

  • Array: [1, 2, 3]
    • access: O(1)
    • search: O(n)
    • insertion: O(1) amortized
    • deletion: O(n)

Code Metrics

  • Lines of Code: 34
  • Cyclomatic Complexity: 1
  • Max Nesting Level: 2

Recommendations

  • VERIFICATION: ⚠️ Manual Review Needed: Low confidence score suggests manual verification is required

💡 Analysis Tips

  • Time Complexity: Focus on the dominant operation in loops
  • Space Complexity: Consider auxiliary data structures
  • Optimization: Look for opportunities to improve efficiency
  • Edge Cases: Ensure your solution handles empty inputs, null/undefined, edge conditions

📁 Analysis Files Created

Detailed analysis files have been automatically generated and committed to docs/analysis/ for future reference.

🎯 Next Steps

  1. Review any ESLint errors/warnings above
  2. Consider the complexity analysis - is this the optimal approach?
  3. Test with edge cases mentioned in the problem description
  4. Add comments explaining complex logic
  5. Check the docs/analysis/ directory for detailed complexity analysis files

Analysis generated for PR files only

@github-actions
Copy link


🤖 Gemini Code Review (Model: gemini-2.5-flash)

Code Review: arrayProductExcludingCurrent

This solution addresses a classic array manipulation problem with an important constraint. Let's break down the approach and identify key learning opportunities.


1. Pattern Identification

This solution utilizes the Prefix/Suffix Array pattern. It involves computing auxiliary arrays (or variables) that store accumulated results (products in this case) from the beginning (prefix) and the end (suffix) of the input array. These precomputed values are then combined to efficiently calculate the final result for each element.

2. Complexity Verification

  • Time Complexity: O(n)

    • The solution involves three distinct loops.
    • The first loop iterates n-1 times to populate the prefix array.
    • The second loop iterates n-1 times to populate the suffix array.
    • The third loop iterates n times to compute the result array.
    • Since n-1 and n are all proportional to n, the total time complexity is O(n) + O(n) + O(n) = O(n).
    • Verdict: The stated time complexity O(n) is accurate.
  • Space Complexity: O(n)

    • The solution creates three new arrays: prefix, suffix, and result, each of size n.
    • Therefore, the total auxiliary space used is O(n) + O(n) + O(n) = O(n).
    • Verdict: The stated space complexity O(n) is accurate.

3. Key Insight

The key insight for solving this problem without using the division operator is realizing that the product of all elements except numbers[i] can be broken down into two parts:

  1. The product of all elements to the left of numbers[i].
  2. The product of all elements to the right of numbers[i].

By pre-calculating these "prefix products" and "suffix products" in two separate passes, we can then compute result[i] by simply multiplying prefix[i] (product of elements before i) and suffix[i] (product of elements after i). This avoids division entirely and processes each element only a constant number of times.

4. Edge Case Analysis

The current solution handles several crucial edge cases correctly:

  • Arrays with zeros:
    • Single zero: If numbers contains exactly one zero, say at index k, then result[k] will be the product of all non-zero elements, and all other result[i] (where i != k) will be 0. The prefix/suffix product approach naturally handles this.
    • Multiple zeros: If numbers contains two or more zeros, then every result[i] will be 0. Again, the prefix/suffix product approach correctly yields this outcome.
  • Negative numbers: Products involving negative numbers (e.g., [-1, -2, -3]) are handled correctly by standard multiplication.
  • 0 vs. -0 in JavaScript: JavaScript has a concept of -0. If a multiplication results in -0 (e.g., 1 * -0), the problem typically expects 0. The line if (Object.is(result[i], -0)) { result[i] = 0; } explicitly addresses this JavaScript-specific nuance, which is excellent attention to detail.
  • Constraint boundaries: The problem states 2 <= numbers.length <= 1000 and -10 <= numbers[i] <= 10. The solution correctly handles arrays of minimum length (2) and values at the min/max bounds. The intermediate products are also guaranteed to fit within a 32-bit integer, so no overflow issues.

5. Learning Points

  • Similar problems using Prefix/Suffix pattern:
    • Product of Array Except Self (LeetCode 238): This is essentially the same problem, often used to introduce the pattern.
    • Range Sum Query - Immutable (LeetCode 303): Precompute prefix sums to answer sum queries in O(1) time.
    • Subarray Sum Equals K (LeetCode 560): Can use prefix sums combined with a hash map.
    • Trapping Rain Water (LeetCode 42): Can be solved by finding the maximum left and maximum right heights for each bar.
    • Largest Rectangle in Histogram (LeetCode 84): Can use a similar idea to find the nearest smaller element to the left and right.
  • Common mistakes with this pattern:
    • Off-by-one errors: Incorrectly setting loop boundaries or array indices when calculating prefix/suffix values.
    • Incorrect base cases: Not initializing prefix[0] or suffix[n-1] correctly (they should often be 1 for products, or 0 for sums).
    • Forgetting constraints: Attempting to use division when it's disallowed, or not handling zero values carefully when division is allowed.
  • Variations of this problem:
    • Calculate the sum of all elements except numbers[i]. This is simpler, as you can compute the total sum and then totalSum - numbers[i].
    • Allow division: This simplifies the problem significantly. Calculate the total product of the array. If there are no zeros, result[i] = totalProduct / numbers[i]. If there's one zero, only that index will have a non-zero result. If there are multiple zeros, all results are zero.
    • Find the maximum product subarray (LeetCode 152): A more complex variation that considers contiguous subarrays.

6. Code Quality

The code quality is good:

  • Variable Naming: numbers, n, prefix, suffix, result are all descriptive and clearly indicate their purpose.
  • Code Structure: The three-pass approach is clearly separated into distinct loops, making the logic easy to follow.
  • Readability: The comments briefly explain the purpose of each loop, which is helpful.
  • TypeScript Usage: Correct type annotations (number[]) are used.
  • Object.is(result[i], -0): This is a robust way to check for negative zero specifically, which is a good detail for JavaScript solutions.

Minor Improvement Suggestion:
The comments like // store the values for previous indexes are accurate but slightly redundant given the clear variable names and loop logic. You could make them more concise or focus on the why rather than the what. For example:

  // Calculate prefix products: prefix[i] stores the product of numbers[0...i-1]
  for (let i = 1; i < n; i++) {
    prefix[i] = prefix[i - 1] * numbers[i - 1];
  }

  // Calculate suffix products: suffix[i] stores the product of numbers[i+1...n-1]
  for (let i = n - 2; i >= 0; i--) {
    suffix[i] = suffix[i + 1] * numbers[i + 1];
  }

  // Combine prefix and suffix products to get the final result
  for (let i = 0; i < n; i++) {
    result[i] = prefix[i] * suffix[i];
    // Handle JavaScript's -0 behavior: convert to 0 if applicable
    if (Object.is(result[i], -0)) {
      result[i] = 0;
    }
  }

This is a very minor point, and the current comments are perfectly understandable.

7. Alternative Approaches

  1. Single Pass with O(1) Extra Space (Excluding Output Array):

    • Approach: Initialize the result array with 1s. In the first pass, iterate from left to right, accumulating prefix products directly into result. So, result[i] will hold product(numbers[0...i-1]). In the second pass, iterate from right to left, maintaining a suffixProduct variable. Multiply result[i] by suffixProduct and then update suffixProduct with numbers[i].
    • Trade-offs:
      • Time: O(n) (two passes).
      • Space: O(1) auxiliary space, if the result array itself is considered part of the output and not "extra" space. This is often the most optimized solution in terms of space.
      • Complexity: Slightly trickier to implement correctly due to updating result in place and managing the suffixProduct variable.
  2. Brute Force (Using Nested Loops):

    • Approach: For each element numbers[i], iterate through the entire numbers array again. If the current index j is not equal to i, multiply numbers[j] into a temporary product. Store this product in result[i].
    • Trade-offs:
      • Time: O(n^2) because of the nested loops.
      • Space: O(n) for the result array.
      • Complexity: Simplest to understand and implement, but highly inefficient for larger inputs. This approach would likely exceed time limits on platforms like LeetCode.

The chosen solution (two-pass prefix/suffix arrays) is a standard, efficient, and clear approach given the "no division" constraint. The single-pass variant is a common optimization to reduce auxiliary space if that's a strict requirement.

@github-actions
Copy link


🤖 Gemini Code Review (Model: gemini-2.5-flash)

Here's a review of your solution for "Array Product Excluding Current":


1. Pattern Identification

This solution uses the Prefix/Suffix Products pattern. It breaks down the problem of calculating a product excluding the current element into two subproblems:

  1. Calculating the product of all elements to the left of the current index.
  2. Calculating the product of all elements to the right of the current index.

The final result for each index i is then the product of its left-side product and its right-side product.

2. Complexity Verification

  • Time Complexity: O(n)

    • The solution involves three separate loops, each iterating n times (once for prefix products, once for suffix products, and once to combine them). Since n is the length of the numbers array, the total time complexity is O(n) + O(n) + O(n), which simplifies to O(n).
    • Verdict: Stated time complexity is accurate.
  • Space Complexity: O(n)

    • The solution creates three new arrays: prefix, suffix, and result, each of size n. Therefore, the total space complexity is O(n) + O(n) + O(n), which simplifies to O(n).
    • Verdict: Stated space complexity is accurate.

3. Key Insight

The key insight for this problem, especially given the constraint that division is prohibited, is that the product of all elements except numbers[i] can be expressed as the product of elements before numbers[i] multiplied by the product of elements after numbers[i].

By pre-calculating these "prefix products" and "suffix products" in two separate passes, we can then compute each result[i] in constant time. This avoids the O(n^2) brute-force approach (where for each element, you iterate the whole array again) and circumvents the division operator which would otherwise be a straightforward (but disallowed) solution.

4. Edge Case Analysis

The provided tests cover a good range of edge cases:

  • Zeros:
    • [2, 0, 3] (single zero): Correctly produces [0, 6, 0].
    • [0, 0, -1, 1] (multiple zeros): Correctly produces [0, 0, 0, 0].
    • [0, 0] (array with only zeros): Correctly produces [0, 0].
    • [1, 0, 3] and [2, 3, 0] (zero at different positions).
  • Negative numbers: [-1, -2, -3] and [-2, 3, -4].
  • Ones: [1, 1, 1] and [1, 2, 1, 3].
  • Smallest array size: [5, 2] (length 2, as per constraints 2 <= numbers.length).
  • 0 vs -0: The explicit check if (Object.is(result[i], -0)) { result[i] = 0; } is an excellent detail for JavaScript, ensuring that -0 results (which can arise from 0 * -5, for example) are normalized to 0, which is generally preferred in mathematical contexts unless signed zeros are specifically required.

Potential Missing Edge Cases (though constraints might implicitly cover some):

  • Maximum/Minimum values: The constraints -10 <= numbers[i] <= 10 and "product of any prefix or suffix ... is ensured to fit within a 32-bit integer" simplify things. If numbers could be much larger, overflow handling would be a concern, but it's not needed here.
  • All same numbers: [5, 5, 5] -> [25, 25, 25]. (Covered by general tests).

The current solution appears robust for the given constraints and problem statement.

5. Learning Points

  • Similar Problems using this pattern:

    • Prefix Sums / Suffix Sums: Many array problems can be optimized by pre-calculating sums of prefixes or suffixes. Examples include "Range Sum Query - Immutable" (LeetCode 303), finding subarrays with a certain sum, or problems involving balanced sums.
    • Trapping Rain Water (LeetCode 42): Uses a similar idea of computing max_left and max_right arrays to determine how much water can be trapped at each position.
    • Maximum Subarray (Kadane's Algorithm): While not directly prefix/suffix arrays, it maintains a running sum, which is a form of prefix calculation.
    • Any problem requiring information about "elements to the left/right": If you need to know something about the elements before i and something about the elements after i to compute result[i], a two-pass prefix/suffix approach is often efficient.
  • Common Mistakes with this pattern:

    • Off-by-one errors: Incorrectly setting the initial values for prefix[0] or suffix[n-1], or using i instead of i-1/i+1 in the loops. The current solution correctly initializes prefix[0] and suffix[n-1] to 1 (representing an empty product) and uses appropriate indices.
    • Incorrect loop boundaries: Making the loops too short or too long.
    • Forgetting the base cases: The product of an empty set of numbers is 1, not 0.
    • Handling zeros improperly: Not considering how a single zero or multiple zeros will affect the products. Your solution handles this very well.
  • Variations of this problem:

    • Sum of array excluding current: The same pattern applies, just replace multiplication with addition.
    • Product of k elements excluding current: More complex, might involve combinations or a sliding window approach.
    • With division allowed: If division were allowed, a simpler O(n) approach would be to calculate the total product of the array first. Then, for each numbers[i], divide the total product by numbers[i]. Special handling for zeros would still be needed (e.g., if there's one zero, all results are 0 except at the zero's index; if there are multiple zeros, all results are 0).

6. Code Quality

  • Variable Naming: numbers, n, prefix, suffix, result, i are all clear, descriptive, and follow common conventions.
  • Code Structure: The solution is well-structured with clear steps for calculating prefix, suffix, and final results.
  • Readability: The code is very readable. Comments are helpful and explain the purpose of each array and loop.
  • TypeScript Best Practices:
    • Using const for n, prefix, suffix, result is good, as these variables are not reassigned.
    • The type annotation numbers: number[] and number[] for the return type are correct.
    • The use of new Array(n).fill(1) is idiomatic for creating initialized arrays.
    • The Object.is(result[i], -0) check is a nice touch for JavaScript's numerical quirks.

Minor Improvement Suggestion (very minor):
The prefix and suffix arrays are created and filled with 1s. While correct, you could technically initialize them with n elements and then fill them during the loops. This is more of a stylistic point and doesn't change complexity or correctness. Your current approach is perfectly fine.

// Current approach:
const prefix = new Array(n).fill(1); // Fills with 1s
// Then populate from i=1
for (let i = 1; i < n; i++) {
  prefix[i] = prefix[i - 1] * numbers[i - 1];
}

// Alternative (saves one pass of .fill(), but slightly different mental model for initialization):
const prefix = new Array(n);
prefix[0] = 1; // Explicitly set the base case
for (let i = 1; i < n; i++) {
  prefix[i] = prefix[i - 1] * numbers[i - 1];
}
// Similar for suffix

This is a very minor point and your current implementation is already very clear.

7. Alternative Approaches

  1. Brute Force (O(n^2) time, O(1) auxiliary space besides result array):

    • For each element numbers[i], iterate through the entire numbers array again.
    • Multiply all elements numbers[j] where j != i.
    • Trade-offs: Simple to understand and implement, but inefficient for larger n. It would likely exceed time limits on platforms like LeetCode.
  2. Optimized Space (O(n) time, O(1) auxiliary space besides result array):

    • Instead of creating separate prefix and suffix arrays, you can perform calculations directly into the result array.
    • Pass 1 (Left-to-Right): Initialize result with all 1s. Iterate from i=1 to n-1. For each i, result[i] = result[i-1] * numbers[i-1]. After this pass, result[i] holds the product of all elements to the left of i.
    • Pass 2 (Right-to-Left): Initialize a rightProduct variable to 1. Iterate from i=n-1 down to 0. For each i, result[i] = result[i] * rightProduct. Then, update rightProduct = rightProduct * numbers[i].
    • Trade-offs: Achieves the optimal O(1) auxiliary space (excluding the output array, which is O(n) by definition) while maintaining O(n) time. This is generally considered the most optimal solution for this problem. Your current solution uses O(n) auxiliary space, which is also optimal if the problem implies you can use O(n) extra space.

Your current solution is excellent and correctly solves the problem efficiently while adhering to the constraints. The -0 handling is a thoughtful touch for JavaScript.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new solution for the "Array Product Excluding Current" problem to the GreatFrontEnd Blind 75 collection. The solution implements an efficient prefix-suffix array approach to calculate the product of all elements except the current one without using division.

Changes:

  • Implements the arrayProductExcluding function using prefix and suffix arrays with O(n) time complexity
  • Adds comprehensive test coverage with edge cases including zeros, negative numbers, and the -0 edge case
  • Updates progress tracking to reflect 5/75 Blind 75 problems completed (up from 4/75)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
array-product-excluding-current.ts Core solution implementation using prefix/suffix arrays to compute products excluding current element
array-product-excluding-current.test.ts Comprehensive test suite covering edge cases, boundary conditions, and the -0 normalization behavior
array-product-excluding-current/README.md Problem description with constraints, examples, and notes about the division operator prohibition
greatfrontend/blind-75/README.md Updates Arrays category from 2/15 to 3/15 and overall status from 4/75 to 5/75
README.md Updates total GreatFrontEnd problems solved from 9 to 10

import { describe, it, expect } from 'vitest';
import { arrayProductExcluding } from './array-product-excluding-current';

describe('arrayProductExcludingCurrent', () => {
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The describe block name 'arrayProductExcludingCurrent' doesn't match the actual function name 'arrayProductExcluding'. For consistency and clarity, the describe block should match the function name being tested.

Suggested change
describe('arrayProductExcludingCurrent', () => {
describe('arrayProductExcluding', () => {

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

54-55: Update the Blind 75 count to maintain consistency.

Line 55 still shows "Blind 75: 4/75 problems" but should be updated to "5/75 problems" to match the progress shown in greatfrontend/blind-75/README.md (line 7), which correctly reflects the new problem addition.

📝 Proposed fix
 - GFE 75: 5/75 problems
-- Blind 75: 4/75 problems
+- Blind 75: 5/75 problems
🤖 Fix all issues with AI agents
In @greatfrontend/blind-75/array/array-product-excluding-current/README.md:
- Around line 1-2: Update the README for the "Array Product Excluding Current"
problem to include a difficulty badge and a link to the problem on
GreatFrontEnd: add a difficulty indicator (e.g., Easy/Medium/Hard badge) next to
the title "Array Product Excluding Current" and insert a short "Problem link"
line below the title pointing to the GreatFrontEnd problem URL (verify the exact
URL on GreatFrontEnd). Ensure the badge and link follow the project's README
format used by other problems in the repo.
🧹 Nitpick comments (2)
greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts (1)

1-34: Clean and correct prefix-suffix implementation.

The algorithm correctly computes product of all elements except the current one using prefix and suffix arrays. The O(n) time complexity is optimal, and the -0 handling is a nice touch.

One optional space optimization: you could reduce space from O(n) to O(1) (excluding output) by computing prefix products directly in the result array, then iterating backwards with a running suffix multiplier:

♻️ Optional: O(1) space optimization
 export function arrayProductExcluding(numbers: number[]): number[] {
   const n = numbers.length;
-
-  // store the values for previous indexes
-  const prefix = new Array(n).fill(1);
-  // store the values for the next indexes
-  const suffix = new Array(n).fill(1);
-
   const result = new Array(n).fill(1);
 
-  // iterate and multiply the previous stored value with the previous numbers value
+  // Build prefix products in result
   for (let i = 1; i < n; i++) {
-    prefix[i] = prefix[i - 1] * numbers[i - 1];
+    result[i] = result[i - 1] * numbers[i - 1];
   }
 
-  // iterate and multiply the next stored value with the next numbers value
-  for (let i = n - 2; i >= 0; i--) {
-    suffix[i] = suffix[i + 1] * numbers[i + 1];
-  }
-
-  // iterate and multiply the previous values with the next values, which won't contain the current value
-  for (let i = 0; i < n; i++) {
-    result[i] = prefix[i] * suffix[i];
+  // Multiply by suffix products from right to left
+  let suffix = 1;
+  for (let i = n - 1; i >= 0; i--) {
+    result[i] *= suffix;
+    suffix *= numbers[i];
     if (Object.is(result[i], -0)) {
       result[i] = 0;
     }
   }
 
   return result;
 }
greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts (1)

4-42: Good test coverage, but missing edge case tests for empty and single-element arrays.

Based on learnings, tests should include edge cases for empty arrays and single elements. These boundary conditions help ensure the function handles degenerate inputs gracefully.

🧪 Add edge case tests
 describe('arrayProductExcludingCurrent', () => {
+  it('should handle empty array', () => {
+    expect(arrayProductExcluding([])).toEqual([]);
+  });
+
+  it('should handle single element array', () => {
+    expect(arrayProductExcluding([5])).toEqual([1]);
+  });
+
   it('should return an array of products excluding the current element', () => {
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e248627 and c71e575.

📒 Files selected for processing (5)
  • README.md
  • greatfrontend/blind-75/README.md
  • greatfrontend/blind-75/array/array-product-excluding-current/README.md
  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
🧰 Additional context used
📓 Path-based instructions (12)
**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.ts: Use explicit type annotations for function parameters and return types
Follow strict TypeScript configuration (defined in tsconfig.json)
Target ES2020 with CommonJS modules
Strict mode enabled with ES2020 target and CommonJS modules for TypeScript

**/*.ts: Use explicit type annotations for function parameters and return types in TypeScript solutions
Follow strict TypeScript configuration with ES2020 target and CommonJS modules
Avoid any type unless absolutely necessary in TypeScript solutions
Use interfaces for object types in TypeScript solutions

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/*.{ts,js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,js}: Test complex algorithms with helper functions, data structure implementations, solutions with multiple edge cases, GreatFrontEnd API implementations, and reusable utility functions
Use descriptive variable names (single letters like i, j, k are acceptable for loop iterators and standard mathematical contexts)
Don't use deprecated JavaScript features

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/*-*.{ts,js,md}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use kebab-case for file names matching problem names

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/*.{js,ts}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{js,ts}: Verify the solution correctly solves the problem for all test cases, including edge cases: empty arrays, single elements, negative numbers, null values
Document and verify time and space complexity using Big O notation, typically in code comments or docs/analysis/ files
Use clear, descriptive variable names (not just i, j, k unless in simple loops) and add comments for non-obvious logic or algorithm steps
Use const by default, let only when reassignment is needed; avoid var except for LeetCode solution function definitions
Use strict equality (===) over loose equality (==)
Use modern ES6+ syntax (arrow functions, destructuring, spread operators) where appropriate and prefer built-in methods (.map(), .filter(), .reduce())

**/*.{js,ts}: Use const by default, let only when reassignment is needed in JavaScript/TypeScript
Use strict equality (===) over loose equality (==) in JavaScript/TypeScript
Use descriptive variable names; single letters like i, j, k acceptable only for standard loop contexts
Prefer built-in array methods (.map(), .filter(), .reduce()) in JavaScript/TypeScript
Fix ESLint errors with npm run quality:fix and ensure proper code formatting with Prettier

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/array/**/*.{js,ts}

📄 CodeRabbit inference engine (CLAUDE.md)

Check for two-pointer technique correctness, verify sliding window boundaries, and confirm hash map usage is optimal

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/greatfrontend/**/*.{js,ts}

📄 CodeRabbit inference engine (CLAUDE.md)

**/greatfrontend/**/*.{js,ts}: Verify correct usage of browser APIs (DOM, Fetch, Storage, etc.), check for browser compatibility considerations, and validate event handling patterns with proper cleanup
Check for unnecessary re-renders or DOM manipulations, verify efficient data structure usage for UI updates, and look for debouncing/throttling where appropriate
Verify parameter validation, error handling, and consider edge cases specific to browser environments (empty inputs, invalid types)

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts
  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/README.md

📄 CodeRabbit inference engine (CLAUDE.md)

Include problem title and difficulty badge, link to the problem on the respective platform (LeetCode, GreatFrontEnd, etc.), problem description, examples and constraints

Files:

  • README.md
  • greatfrontend/blind-75/array/array-product-excluding-current/README.md
  • greatfrontend/blind-75/README.md
README.md

📄 CodeRabbit inference engine (AGENTS.md)

Update README.md when adding new solutions

Files:

  • README.md
**/*.test.{ts,js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use *.test.ts or *.test.js naming convention for test files

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/*.test.{js,ts}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Vitest for testing complex solutions, data structures, and GreatFrontEnd implementations; ensure tests handle edge cases, async operations, and cleanup logic

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Test all examples from problem description in test files
Add edge case tests: empty inputs, single elements, nulls, boundary conditions in test files
Use descriptive test names that explain what is being tested in test files
Group related tests using describe blocks in test files
Include both positive and negative test cases in test files
Add test cases for new solutions and update tests when refactoring existing solutions

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
**/*-*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

Test files should use kebab-case naming with .test.ts extension: {problem-name}.test.ts

Files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T13:41:24.644Z
Learning: Applies to **/*.{js,ts} : Verify the solution correctly solves the problem for all test cases, including edge cases: empty arrays, single elements, negative numbers, null values
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T13:41:24.644Z
Learning: Applies to **/array/**/*.{js,ts} : Check for two-pointer technique correctness, verify sliding window boundaries, and confirm hash map usage is optimal
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to **/*.test.ts : Add test cases for new solutions and update tests when refactoring existing solutions
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to leetcode/**/*.{js,ts} : Keep LeetCode solutions concise and focused on the algorithm
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to leetcode/**/*.{js,ts} : Test edge cases if adding or modifying solution code
📚 Learning: 2025-12-30T13:41:24.644Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T13:41:24.644Z
Learning: Applies to **/README.md : Include problem title and difficulty badge, link to the problem on the respective platform (LeetCode, GreatFrontEnd, etc.), problem description, examples and constraints

Applied to files:

  • README.md
📚 Learning: 2025-12-30T13:41:58.622Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to **/*.test.ts : Add edge case tests: empty inputs, single elements, nulls, boundary conditions in test files

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:58.622Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to **/*.test.ts : Include both positive and negative test cases in test files

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:24.644Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T13:41:24.644Z
Learning: Applies to **/*.{js,ts} : Verify the solution correctly solves the problem for all test cases, including edge cases: empty arrays, single elements, negative numbers, null values

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:58.622Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to **/*.test.ts : Add test cases for new solutions and update tests when refactoring existing solutions

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:58.622Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to **/*.test.ts : Test all examples from problem description in test files

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:24.644Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T13:41:24.644Z
Learning: Applies to **/*.test.{js,ts} : Use Vitest for testing complex solutions, data structures, and GreatFrontEnd implementations; ensure tests handle edge cases, async operations, and cleanup logic

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:07.657Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-30T13:41:07.657Z
Learning: Applies to **/*.{ts,js} : Test complex algorithms with helper functions, data structure implementations, solutions with multiple edge cases, GreatFrontEnd API implementations, and reusable utility functions

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:24.644Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T13:41:24.644Z
Learning: Applies to **/array/**/*.{js,ts} : Check for two-pointer technique correctness, verify sliding window boundaries, and confirm hash map usage is optimal

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:58.622Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to **/*.test.ts : Group related tests using `describe` blocks in test files

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:58.622Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to **/*.test.ts : Use descriptive test names that explain what is being tested in test files

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts
📚 Learning: 2025-12-30T13:41:58.622Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to leetcode/**/README.md : Keep README files up to date with problem counts and organization

Applied to files:

  • greatfrontend/blind-75/array/array-product-excluding-current/README.md
  • greatfrontend/blind-75/README.md
📚 Learning: 2025-12-30T13:41:58.622Z
Learnt from: CR
Repo: pertrai1/coding-challenges PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T13:41:58.622Z
Learning: Applies to leetcode/**/*.{js,ts} : Review complexity analysis reports for algorithm files after running quality checks

Applied to files:

  • greatfrontend/blind-75/README.md
🧬 Code graph analysis (1)
greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts (1)
greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.ts (1)
  • arrayProductExcluding (5-34)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Agent
  • GitHub Check: review
🔇 Additional comments (5)
README.md (1)

10-10: LGTM! Total count correctly updated.

The GreatFrontEnd total increased from 9 to 10, which correctly reflects the addition of the new Blind 75 problem (5 GFE 75 + 5 Blind 75 = 10 total).

greatfrontend/blind-75/array/array-product-excluding-current/README.md (1)

3-33: LGTM! Comprehensive problem documentation.

The problem description, examples with explanations, constraints, and special notes (no division, 32-bit guarantee) are all clearly documented and well-structured.

greatfrontend/blind-75/README.md (2)

7-7: LGTM! Progress count correctly updated.

The overall Blind 75 progress accurately reflects the addition of the new Array problem (4/75 → 5/75).


15-19: LGTM! Arrays section properly updated.

The Arrays section count (2/15 → 3/15) and the new problem entry are both correct. The new problem is properly formatted with the difficulty level and relative path.

greatfrontend/blind-75/array/array-product-excluding-current/array-product-excluding-current.test.ts (1)

1-2: LGTM!

Good use of Vitest with proper imports and the test file follows the naming convention.

Comment on lines +1 to +2
# Array Product Excluding Current

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add difficulty badge and platform link.

According to the coding guidelines, problem READMEs should include a difficulty badge and link to the problem on the respective platform (GreatFrontEnd in this case). Based on coding guidelines for **/README.md files.

📝 Suggested format
 # Array Product Excluding Current
+
+![Medium](https://img.shields.io/badge/Medium-orange)
+
+[View problem on GreatFrontEnd](https://www.greatfrontend.com/questions/javascript/array-product-excluding-current)

Note: Please verify the exact URL for the problem on GreatFrontEnd.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Array Product Excluding Current
# Array Product Excluding Current
![Medium](https://img.shields.io/badge/Medium-orange)
[View problem on GreatFrontEnd](https://www.greatfrontend.com/questions/javascript/array-product-excluding-current)
🤖 Prompt for AI Agents
In @greatfrontend/blind-75/array/array-product-excluding-current/README.md
around lines 1 - 2, Update the README for the "Array Product Excluding Current"
problem to include a difficulty badge and a link to the problem on
GreatFrontEnd: add a difficulty indicator (e.g., Easy/Medium/Hard badge) next to
the title "Array Product Excluding Current" and insert a short "Problem link"
line below the title pointing to the GreatFrontEnd problem URL (verify the exact
URL on GreatFrontEnd). Ensure the badge and link follow the project's README
format used by other problems in the repo.

@pertrai1 pertrai1 merged commit 7413cba into main Jan 12, 2026
16 of 17 checks passed
@pertrai1 pertrai1 deleted the blind-1122025 branch January 12, 2026 14:09
@github-actions
Copy link

📅 Spaced Repetition Reviews Scheduled!

Great job solving #GFE-022a - Array Product Excluding Current! 🎉

To help you retain this knowledge long-term, I've scheduled 5 review sessions using spaced repetition:

Review Interval Schedule Logic
1st Review 1 day after solving Scheduled now
2nd Review 3 days after 1st review Auto-scheduled when 1st completes
3rd Review 7 days after 2nd review Auto-scheduled when 2nd completes
4th Review 14 days after 3rd review Auto-scheduled when 3rd completes
5th Review 30 days after 4th review Auto-scheduled when 4th completes

What to expect:

  • Your 1st review is scheduled for tomorrow
  • Each subsequent review is scheduled automatically when you complete the previous one
  • This ensures proper spacing even if you complete a review a few days late
  • GitHub issues will be created automatically for each review
  • Each issue will link back to your solution

🧠 Why Spaced Repetition?

Research shows that reviewing material at increasing intervals dramatically improves retention. This adaptive scheduling ensures optimal spacing based on when you actually complete each review!

Check docs/reviews/review-schedule.json to see your review schedule.

github-actions bot pushed a commit that referenced this pull request Jan 12, 2026
  Problem: #GFE-022a - Array Product Excluding Current
  PR: #182
  First review scheduled (subsequent reviews auto-scheduled on completion)

  [skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code challenge this is a coding challenge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants