Median Updates

Cerinta completa The median of numbers is defined as the middle number after sorting them in order if is odd. Or it is the average of the middle two numbers if is even. You start with an empty number list.

Left Rotation

Cerinta completa A operation on a circular array shifts each of the array’s elements unit to the left. The elements that fall off the left end reappear at the right end. Given an integer , rotate the array that many

Equal Stacks

Cerinta completa You have three stacks of cylinders where each cylinder has the same diameter, but they may vary in height. You can change the height of a stack by removing and discarding its topmost cylinder any number of times.

Easy Addition

Cerinta completa You are given a tree with N nodes and each has a value associated with it. You are given Q queries, each of which is either an update or a retrieval operation. Initially all node values are zero.

Library Query

Cerinta completa A giant library has just been inaugurated this week. It can be modeled as a sequence of N consecutive shelves with each shelf having some number of books. Now, being the geek that you are, you thought of

Divisibility

Cerinta completa Two positive integers and are given. is decimal representation of integer . Lets define . For example, if : For each query you will be given two integers and that define a substring equal to . Your task

Kundu and Tree

Cerinta completa Kundu is true tree lover. Tree is a connected graph having N vertices and N-1 edges. Today when he got a tree, he colored each edge with one of either red(r) or black(b) color. He is interested in