## 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…

Skip to content
# Blog

##
GS OA – Two Flowers

##
Largest Tree Uber OA

##
Tubby and Tom – DE Shaw OA

##
Exploring Linear Diophantine Equation

##
DSU on Trees #1 Merging subsets on Tree

##
Binary Lifting #1 CF-702E

##
SUMPRO – SUM OF PRODUCT

##
#5 Range Updates and Range Queries

##
Segment Trees #4 Segment Tree on Rooted Tree: Point Queries + DP

##
KADANE’S ALGORITHM

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

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

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

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

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

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

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

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…

Continue Reading
#5 Range Updates and Range Queries

JosephLand Problem Statement: here The problem, in short, says: You have a tree with edges directed towards the root and nodes having some tickets. Each ticket allows you to move…

Continue Reading
Segment Trees #4 Segment Tree on Rooted Tree: Point Queries + DP

A Brief Introduction Problem Statement - Find the maximum sum sub-array of the given array Let us assume the maximum sum sub-array lies between index L to R. We can…

Continue Reading
KADANE’S ALGORITHM

- 1
- 2
- 3
- 4
- 5
- Go to the next page