Sum Pair closest to target

gfg-potd

Given an array arr[] and a number target, find a pair of elements (a, b) in arr[], where a<=b whose sum is closest to target.Note: Return the

2381. Shifting Letters II

leetcode-potd

You are given a string s of lowercase English letters and a 2D integer array shifts where shifts[i] = [starti, endi, directioni]. For every i, shift the characters

Subarrays with sum K

gfg-potd

Given an unsorted array of integers, find the number of continuous subarrays having sum exactly equal to a given number k.

Scroll to Top