Pre-requisite: Fractional Knapsack Problem Given two arrays weight[] and profit[] the weights and profit of N items, we need to put these items in a… Read More

# Category Archives: Competitive Programming

Given a binary string S, the task is to find the minimum number of Powers of 2 required to express a S.Examples: Input: S =… Read More

Problem Description The problem solvers have found a new Island for coding and named it as Philaland. These smart people were given a task to… Read More

Problem Description On a busy road, multiple cars are passing by. A simulation is run to see what happens if brakes fail for all cars… Read More

Given two integer P and Q, the task is to find the value of P and modular inverse of Q modulo 998244353. That is Note:… Read More

Given an integer X, the task is to find two integers A and B such that sum of these two numbers is X and the… Read More

Given an array arr[] consisting of integers in the range [1, N], the task is to determine whether the Inverse Permutation of the given array… Read More

Testing Coding problems can sometimes become hectic. Here are some tips to use while testing Algorithmic Programming Problems. There are generally four major categories of… Read More

Given a number in form of string str and an integer K, the task is to find the smallest integer that can be formed after… Read More

C++ filter_none edit close play_arrow link brightness_4 code // C++ code #include <iostream> #include <utility> using namespace std; int main() { // Declaring the… Read More

Given a binary string str, the task is to check whether the given string follows the below condition or not: String starts with a ‘1’.… Read More

Check whether two strings can be made equal by reversing substring of equal length from both strings

Give two strings S1 and S2, the task is to check whether string S1 can be made equal to string S2 by reversing substring from… Read More

Given an array arr[] of N positive integers, the task is to find the largest strictly increasing subsequence of arr[] such that the indices of… Read More

Given an integer K and an array arr[] which denotes the amount that can be stolen, the task is to choose a subset of items… Read More