Author name: Admin

Find All Triplets with Zero Sum

gfg-potd

Given an array arr[], find all possible indices [i, j, k] of triplets [arr[i], arr[j], arr[k]] in the array whose sum is equal to zero. Return indices of […]

796. Rotate String

leetcode-potd

Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the rightmost

Is Linked List Length Even?

gfg-potd

Given a linked list, your task is to complete the function isLengthEven() which contains the head of the linked list, and check whether the length

2490. Circular Sentence

leetcode-potd

A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, “Hello World”, “HELLO”, “hello world

Kth distance

gfg-potd

Given an unsorted array arr and anumber k which is smaller than size of the array. Find if the array contains duplicates within k distance. Examples:

Swap and Maximize

gfg-potd

Given an array arr[ ] of positive elements. Consider the array as a circular array, meaning the element after the last element

Pairs with difference k

gfg-potd

Given an array arr[] of positive integers. Find the number of pairs of integers whose difference equals a given number k.Note: (a,

Scroll to Top