## GS OA – Two Flowers

Problem Link - Link The question asks us to find the length of the maximum connected component under the constraint that we can merge at max two different numbers. We…

Continue Reading GS OA – Two Flowers

## Largest Tree Uber OA

Question We are given a perfect N-ary tree where N denotes the number of children a node has. The tree has infinite nodes. You are given two nodes x,y. You…

Continue Reading Largest Tree Uber OA

## Tubby and Tom – DE Shaw OA

From now onwards, Tubby = D and Tom = C. So D has to catch C and the first turn is of D. So, the very first thing is to…

Continue Reading Tubby and Tom – DE Shaw OA

## Exploring Linear Diophantine Equation

This is a well-known method to solve linear equations with 2 or more variables. The specialty of this method is that it provides integer solutions to the linear equation of…

Continue Reading Exploring Linear Diophantine Equation

## DSU on Trees #1 Merging subsets on Tree

Hi, this post involves a fairly common technique involved in problems on Trees. The technique is called DSU on Trees - "Small to Large" The idea is used in problems…

Continue Reading DSU on Trees #1 Merging subsets on Tree

## Binary Lifting #1 CF-702E

Introduction to Binary Lifting This is a technique that is widely used to solve problems based on trees and graphs. As the name suggests, we take leaps from current node…

Continue Reading Binary Lifting #1 CF-702E

## SUMPRO – SUM OF PRODUCT

Problem Link - https://www.spoj.com/problems/SUMPRO/ Problem Statement : Given a number N, find the sum of all products x*y such that N/x = y (Integer Division).Since, the sum can be very large, please output this modulo 1000000007.…

Continue Reading SUMPRO – SUM OF PRODUCT

## #5 Range Updates and Range Queries

Counting Zeroes  Problem Statement: here As you have seen in the title of the post, we are going to perform range updates in this question. Till now, in our series, we…