Leena PatelBoyer-Moore Voting AlgorithmThis algorithm efficiently finds the majority element in an array with linear time complexity O(n) and constant space complexity.Jan 26Jan 26
Leena PatelTwo PointerThe two-pointer technique I’m referring to here involves using two pointers which can move either direction. Left and right both are…Jan 22Jan 22
Leena PatelDiagonal DifferenceGiven a square matrix, calculate the absolute difference between the sums of its diagonals.Jan 20Jan 20