Skip to content

Only Code

Eat Code Sleep – repeat

  • Github
  • Home
  • Arrays
  • Linked Lists
  • Trees
  • Stacks
  • Queues
  • Heaps
  • Graphs
  • Algorithms
    • Sorting
    • Dynamic Programming
    • Divide and Conquer
    • Backtracking & Recursion
    • Greedy approach
    • Breadth First Search (BFS)
    • Depth First Search (DFS)

Only Code

Eat Code Sleep – repeat

Close menu
  • Github
  • Home
  • Arrays
  • Linked Lists
  • Trees
  • Stacks
  • Queues
  • Heaps
  • Graphs
  • Algorithms
    • Sorting
    • Dynamic Programming
    • Divide and Conquer
    • Backtracking & Recursion
    • Greedy approach
    • Breadth First Search (BFS)
    • Depth First Search (DFS)

Only Code

Eat Code Sleep – repeat

Search Toggle menu

Category: Arrays

Subset Sum Problem | Meet in the Middle

Meet in the Middle is used to optimize brute-force solutions for problems where the input size is too large for direct approaches.

Arrays, Competitive Programming

Partition Equal Subset Sum – LeetCode Solution [Medium]

Given an integer array determine if you can partition the array into two subsets such that the sum of the elements in both subsets is equal.

Arrays, Competitive Programming

Two Sum Problem | Two-Pointer Technique

This method involves sorting the array and then using two pointers to identify a pair of numbers whose sum equals the target.

Arrays, Competitive Programming

Counting Inversions using Fenwick Tree

Fenwick Trees can efficiently track and count inversions in real-time and even for a continuous stream of data.

Arrays, Competitive Programming

Max of All Subarrays of Size k Using Max Heap in C++

This problem, also referred to as the “sliding window maximum” problem, can be efficiently solved using heaps. We’ve already discussed an O(n) solution.

Arrays, Competitive Programming, Heaps, Interview Questions

Finding the Next Lexicographically Greater Permutation

Given an input sequence in the form of an array, find the lexicographically next greater permutation if it exists.

Arrays, C/C++, Competitive Programming

Search a sorted 2D Matrix

This method has the limitation that it will work for only those matrix where the first integer of each row is greater than the last integer of the previous row.

Arrays, Competitive Programming

Array Indices with Equal sum | Equal Number of Odd or Even numbers on both sides

Given an array, find the indices where the sum of numbers on the left equals the sum on the right.

Arrays

Coin Change II – LeetCode Solution [Medium]

You are given an integer array coins representing coins and an integer amount. Return the number of combinations that make up that amount.

Arrays, Competitive Programming, Dynamic Programming

Coin Change – LeetCode Solution [Medium]

You are given an integer vector coins[n] representing coins of different denominations and an integer amount representing a total amount of money.

Arrays, Competitive Programming, Dynamic Programming

Posts pagination

1 2 3 >
  • Algorithms
  • Arrays
  • Backtracking & Recursion
  • Breadth First Search (BFS)
  • C/C++
  • Competitive Programming
  • Computer Science
  • Data Science
  • Databases
  • Depth First Search (DFS)
  • Divide and Conquer
  • Dynamic Programming
  • Graphs
  • Greedy approach
  • Hashmaps
  • Heaps
  • Interview Questions
  • Java
  • Linked Lists
  • Machine Coding Questions
  • Machine Learning
  • Mathematics
  • Networking
  • Programming Projects
  • Python
  • Queues
  • Sorting
  • Special Data Structures
  • Stacks
  • Trees
  • Web Development
© 2025 Only Code | Aureolls