Given an Integer Array A, find pair such that A[i] == A[j] and |i-j| is minimum
We can solve this using Hashing in Linear time complexity
Idea:
Given an unsorted array A, find longest set of consecutive elements from array A irrespective of the order they appear in the array A
A = [100, 4, 200, 1, 3, 2]
Given an Integer array, Find the maximum length subarray with sum equals to zero
Brute force solution for this is to find all subarrays with sum zero and find maximum among them
A = [1,-2,2,0, 4,0,4]n = len(A)max_length…
Dictionary is kind of hashset and values are stored in a key value pair fashion. For each key in a dictionary, there exists a value linked to…