Logo
MainBooksThoughtsAbout

Patterns

Elixir solutions

1477 LeetCode problem solution

LeetCode 1477 Find Two Non-overlapping Sub-arrays Each With Target Sum solution using Sliding Window and Prefix Minimum patterns. In this solution we have O(n) time and space complexity.

Read more

1621 LeetCode problem solution

LeetCode 1621 Number of Sets of K Non-Overlapping Line. Segments solution using combinatorics and endpoint transformation.

Read more

2472 LeetCode problem solution

LeetCode 2472 Maximum Number of Non-overlapping Palindrome Substrings solution using Dynamic Programming and Palindrome Checking. The key idea is to check only palindromes of length k and k + 1 to find the maximum number of non-overlapping substrings efficiently.

Read more

560 LeetCode problem solution

LeetCode 560 Subarray Sum Equals K solution using Prefix Sum and Hash Map. For each prefix sum, we look for currentSum - k to count valid subarrays in O(n) time.

Read more

4002 LeetCode problem solution

LeetCode 4002 Count Valid Sequences solution using Combinatorics and Complement Counting. Count all positive compositions and subtract all-odd sequences.

Read more
PreviousPage 6 of 13Next
☕Support AlgoBytes on Patreon

© 2026 Algobytes

Privaci Policy