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
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
Is Subsequence – LeetCode Solution [Easy] Given two strings s and t, return true if s is a subsequence of t, or false otherwise. Competitive Programming
Generate Pythagorean Triples Given an integer limit, generate all Pythagorean Triples with values smaller than limit. Interview Questions, Mathematics
Minimum Moves to Equal Array Elements – LeetCode Solution [Medium] When we increment n – 1 elements, the relative difference between the highest number and all other numbers effectively decreases by 1. Arrays, Competitive Programming, Mathematics
Rat in the maze | Minimum number of steps Given a maze with obstacles, find the minimum number of steps the rat needs to take to reach the destination. Breadth First Search (BFS), Competitive Programming