Two problems were asked:
Give a binary tree, each node has a value. It is rooted at 1.
let = sum of node values in the path from to
= sum of nodes values which have as ancestor.
For each node find , return their sum;
Give a binary string, and two type of queries
type 1: Change the value at to
type 2: find the longest substring in to , where start and end of the substring is
or
Size of string and no of queriese are upto
Edit: Asked in IITH for placements