#data-structures
Read more stories on Hashnode
Articles with this tag
Approach: Given two sequence of numbers, start with two starting indexes, and increment second index if the element matched, keep incrementing the...
Approach: It is like getting the bunch of inner perimeters, start with 4 constants which maintain 4 corners, Do this will startRow<=endRow && startCol...
Approach: Use binary search to find the elements and keep updating the closest starting from the root being the closest. return closest using...
Approach: Use two boolean flags increasing and decreasing initially set to true, loop though array start from i = 1 and update those flags by...
Sort the given two arrays. Start with two pointer approach. Both are the start indexes of the two arrays. Start the loop and start calculating the...
Time Complexity O(n^2)|O(n) Space Approach: Use a loop through all elements and use two pointer approach(Left and Right) along with...