Skip to content

Tag Archives: partition

In this article, we are going to learn how to get the number of elements in a partition using Pyspark in Python. Are you a… Read More
Given an array A[] consisting of N integers and an integer K. The task is to find the total number of ways in which you… Read More
Given a binary array A[] of length 2*N, the task is to find the minimum number of partitions that follow the below conditions: Each array… Read More
Given an array arr[] of 1s and -1s, the task is to partition the array into maximum subarrays such that the sum of the alternating… Read More
Given an array arr[] of length N, the task is to find the maximum number of subsets that can be obtained from the given array… Read More
Given a string S of size N consisting of numerical digits 1-9 and a positive integer K, the task is to minimize the partitions of… Read More
Given a binary array arr[] of size N, and an integer K, the task is to calculate the number of ways to partition the array… Read More
Given an array arr[] of length N, the task is to find the minimum number of unique elements possible in total when the array is… Read More
Given an array arr of positive integers of size N, the task is to split the array into 3 partitions, such that the sum of… Read More
Split given Circular Linked List into three halves without calculating its length such that the difference between a linked list with a maximum number of… Read More
Given a string str of length N, and an integer K, the task is to form K different strings by choosing characters from the given… Read More
Given an array arr[] containing N integers where 0 ≤ A[ i ] ≤ N,  the task is to divide the array into two equal… Read More
Given an array arr[] having N positive integers, the task is to find all the indices i (1 ≤ i ≤ N – 1) such… Read More
Given an array arr[] of even length N, the task is to perform the following operations on the given array: Split the given array in… Read More
Given an array and a range [lowVal, highVal], partition the array around the range such that the array is divided into three parts.  All elements… Read More