Logo
MainBooksThoughtsAbout

Patterns

Elixir solutions

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

836 LeetCode problem solution

LeetCode 836 Rectangle Overlap solution using the Interval Overlap pattern. The solution is just one line of code. Using this pattern we simply check whether the rectangles overlap on both the X and Y axes, which takes O(1) time and O(1) space.

Read more

LeetCode 836 Rectangle Overlap problem Elixir solution

LeetCode 836 Rectangle Overlap Elixir solution using the Interval Overlap pattern. Using this pattern we simply check whether the rectangles overlap on both the X and Y axes, which takes O(1) time and O(1) space.

Read more

835 LeetCode problem solution

LeetCode 835 Image Overlap solution with O(n⁴) worst-case time complexity. Despite the complexity, the approach works efficiently because the constraints limit the image size to n ≤ 30. This problem shows once again why, in a coding interview, you should ask about the constraints first and only then implement the solution.

Read more

LeetCode 835 Image Overlap Elixir solution

LeetCode 835 Image Overlap solution in Elixir using coordinate translation and frequency counting patterns. The O(n⁴) worst-case approach remains practical because the matrix size is limited to n ≤ 30.

Read more
PreviousPage 7 of 11Next
☕Support AlgoBytes on Patreon

© 2026 Algobytes

Privaci Policy