4–Sum Problem | Quadruplets with a given sum
Problem The goal is to count all the quadruplets having a target sum S. Sample Input [2,…
Determine the index of an element that satisfies given constraints in…
Problem Given an array of integers, find an index before which all elements are smallest than it…
Find the longest subsequence formed by consecutive integers
Problem Given an array of integers, find the longest subsequence of consecutive integers. Sam…
Shuffle an array according to the given order of elements
Problem Given two integer arrays of the same size, arr[] and index[], reorder elements in arr[] …
Find duplicates within a range k in an array
Problem You are given an array of integers and a number k. You need to check if duplicates exist…
Count the number of strictly increasing subarrays in an array
Problem Given an array, count the total number of strictly increasing subarrays in it. Sample…
Python isalpha, insumeric and isalnum(): A complete Guide
The Python isalpha(), isnumeric() and isalnum() are three string methods that return boolean value …
Longest Subarray with Contiguous Elements
Problem Given an array of distinct integers, find the length of the longest subarray, which cont…
Find the smallest subarray length whose sum of elements is >= k
Find the smallest subarray length whose sum of elements is >= k Problem Given an array of …
Python TypeError: 'tuple' object does not support item assignment Sol…
In Python, we have a built-in data structure " tuple " which is similar to a Python list …
Python AttributeError: 'numpy.ndarray' object has no attribute 'appen…
Numpy is a third-party open-source Python scientific computational library. It is widely used for i…
Python TypeError: 'float' object is not iterable Solution
In Python, we have some iterable objects such as a string, list, tuple, dictionary, and set. The on…