Generate an N-length array having maximum element minimized and sum of array elements divisible by K

Given two positive integers N and K, the task is to minimize the maximum element of the array formed such that the sum of array… Read More

Skip to content

- Tutorials
- Algorithms
- Analysis of Algorithms
- Asymptotic Analysis
- Worst, Average and Best Cases
- Asymptotic Notations
- Little o and little omega notations
- Lower and Upper Bound Theory
- Analysis of Loops
- Solving Recurrences
- Amortized Analysis
- What does 'Space Complexity' mean ?
- Pseudo-polynomial Algorithms
- Polynomial Time Approximation Scheme
- A Time Complexity Question

- Searching Algorithms
- Sorting Algorithms
- Graph Algorithms
- Pattern Searching
- Geometric Algorithms
- Mathematical
- Randomized Algorithms
- Greedy Algorithms
- Dynamic Programming
- Divide and Conquer
- Backtracking
- Branch and Bound
- All Algorithms

- Analysis of Algorithms
- Data Structures
- Languages
- Interview Corner
- GATE
- ISRO CS
- UGC NET CS
- CS Subjects
- Web Technologies
- School Learning
- School Programming
- Mathematics Notes
- NCERT Solutions
- RD Sharma Solutions

- Algorithms
- Student
- Jobs
- Courses

Generate an N-length array having maximum element minimized and sum of array elements divisible by K

Given two positive integers N and K, the task is to minimize the maximum element of the array formed such that the sum of array… Read More

Given an array arr[] consisting of N positive integers, the task is to find the maximum possible sum of the remaining array elements after repeatedly… Read More

Given a positive integer N, the task is to find the number of positive integers whose GCD with the given integer N is the number… Read More

Given an array arr[] consisting of N integers and an integer K, the task is to find the sum of the array elements possible by… Read More

Given an array arr[] of size N and a positive integer K, the task is to find the sum of all array elements which are… Read More

Given an integer N, the task is to find three positive integers A, B, and C such that the value of the expression (3*A +… Read More

Given two strings S and T of length N and M respectively, the task is to find the smallest string that is divisible by both… Read More

-Given two positive integers N and X, the task is to count the occurrences of the given integer X in an N-length square matrix generated… Read More

Given an array arr[] consisting of N positive integers, the task for each array element arr[i] is to find all the digits from [0, 9]… Read More

Given a number N, the task is to count the minimum number of digits to be removed from N to make it divisible by 4.… Read More

Check if all array elements can be made divisible by K by replacing array elements with sum of pairs

Given an array arr[] of size N and a positive integer K, the task is to make every element of the array divisible by K… Read More

Given two integers L and R, the task is to find the count of even and odd Bitwise XOR values of consecutive numbers from the… Read More

Given an integer N, the task is to generate an N-digit number which is comprising only of digits 1 or 2 and is divisible by… Read More

Given an array arr[] consisting of N positive integers, the task is to determine the smallest positive integer K such that none of the array… Read More

Given an array arr[] consisting of N integers which are either 0 or 7, the task is to find the largest number that can be… Read More