### deepak_097's blog

By deepak_097, history, 7 months ago, ,

Suppose we have an array which consist of n elements: a1, a2, a3, ..... , an and we have given the value of k which is the count of removed elements from the array. So after removing k elements from the array what is the maximum value of absolute difference of the adjacent elements of the array. Suppose,

n=5 k=3

1 2 5 2 1

then we remove 1,2,2 then the remaining elements of the array will be 5 1 so, ans=abs(5-1)=4 (maximum value which we can get).

• +10

By deepak_097, history, 9 months ago, ,

• 0

By deepak_097, history, 9 months ago, ,

Can anybody please tell me why i am getting -1 in test case No.9 :(

Problem Name- Hard problem

• +3

By deepak_097, history, 9 months ago, ,

Please mention this kind of problems in comment section.

Thank you :)

• 0

By deepak_097, history, 15 months ago, ,

Please suggest me some problems that are related to bitwise operations (and, or, xor) and segment tree mainly "and" operation related problems.

• 0

By deepak_097, history, 15 months ago, ,

I tried every possible way to get rid over TLE but nothing works.

• 0

By deepak_097, history, 15 months ago, ,

Or help me to understand this solution.

• +12

By deepak_097, history, 16 months ago, ,

I am getting WA on this question can't figure it out where I am going wrong. I tested many cases in which my code is passing correctly :(. Please help me to get rid of this problem.

• 0

By deepak_097, history, 16 months ago, ,

What is the logic behind this to solve this problem ?