Loading Question...
Question: The question is based on the array and on solving it I was told to optimize it as it was taking O(N*N) complexity so I optimised through the HashMap. Given array of length n you need to find the number of pairs such that arr[i]-arr[j]=i-j where 0<=i<j<n.
Question: This question is on the Trees. Here I did using BFS traversal but it goes wrong in some test cases so on making it correct or adding some check conditions it took much time so I wasn't able to complete it on time.