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: Competitive Programming

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

Fenwick Tree (Binary Indexed Tree)

Fenwick Tree’s efficiency, combined with its relatively simple implementation, makes it useful in competitive programming and applications that involve dynamic sum queries and updates.

Competitive Programming, Special Data Structures

Treap (Tree + Heap)

Treap is an efficient and simple data structure that combines the best of both binary search trees and heaps. It provides the benefits of efficient search, insert, and delete operations.

Competitive Programming, Computer Science, Special Data Structures

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 All Subsequences of a String Using Python | Iterative vs Recursive

Subsequences derived from strings by deleting some or no characters without changing order, are crucial in fields like bioinformatics, data mining, and cryptography.

Competitive Programming

Understanding Linearity of Expectation

Linearity of expectation is a powerful concept in probability theory that simplifies the calculation of expected values in probabilistic experiments.

Competitive Programming, Mathematics

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

Posts pagination

1 2 … 9 >
  • 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