MindTIckle Coding Round 2021 Questions
Anonymous User
991

image
image
image
1.Tickerlson problem - Given an array of integers with size N . A operation is defined as : Choose any indexes of array , say x and y (0<=x <=y <=N-1) and inverting all the elements between them ( basically making arr[i] as -arr[i] ) . We can do this operation at most two times .We have to evaluate maximum subarray sum . Example - [2 , -19 ,-1,3,-39,-1,5,-2] operation on (1,2) and (4,5) gives maximum subaray sum as 70.

2.This problem was realted to n-ary tree . min time required to pass information to all nodes from root node. (can be found on gfg).

3.We are given a map with n cities and n-1 roads ,each road connecting two cities bidirectionally . Each city is either infected or not . Infection-spread is defined as absolute difference between no of infected and non-infected cities . We want to cut out a submap of cities with maximum infection-spread .

Can anyone help me in first and third question?

EDIT: ADDED PHOTOS FOR THIRD QUESTION

.

Comments (5)