- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Narendra Kumar has Published 196 Articles
Narendra Kumar
147 Views
Problem statementGiven an unsigned number, find the minimum number that could be formed by using the bits of the given unsigned number.ExampleIf input = 10 then answer would be 3Binary representation of 10 is 1010 and minimum number with 2 set bits is 0011 i.e. 3Algorithm1. Count the number of ... Read More
Narendra Kumar
87 Views
Problem statementLucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. The task is to find minimum lucky number has the sum of digits equal to n.ExampleIf sum = 22 then lucky number is 4477 as 4 + 4 + 7 + 7 ... Read More
Narendra Kumar
72 Views
Problem statementGiven N numbers from 1 to N and a number S. The task is to print the minimum number of numbers that sum up to give SExampleIf n = 7 and s = 10 then minimum 2 numbers are required(9, 1) (8, 2) (7, 3) (6, 4)AlgorithmAnswer can be ... Read More
Narendra Kumar
146 Views
Problem statementWe have an integer N. We need to express N as a sum of K integers such that by adding some or all of these integers we can get all the numbers in the range 1 to N. The task is to find minimum value of KExampleIf N = ... Read More
Narendra Kumar
2K+ Views
Problem statementGiven an array with n positive integers. We need to find the minimum number of operation to make all elements equal. We can perform addition, multiplication, subtraction or division with any element on an array element.ExampleIf input array is = {1, 2, 3, 4} then we require minimum 3 ... Read More
Narendra Kumar
204 Views
Problem statementGiven an integer K and a matrix of M x N, the task is to find the minimum number of operations required to make all the elements of the matrix equal. In a single operation, K can be added to or subtracted from any element of the matrix.ExampleIf input ... Read More
Narendra Kumar
2K+ Views
Problem statementGiven an array with n positive integers. We need to find the minimum number of operation to make all elements equal. We can perform addition, multiplication, subtraction or division with any element on an array element.ExampleIf input array is = {1, 2, 3, 4} then we require minimum 3 ... Read More
Narendra Kumar
148 Views
DescriptionGiven an array of N integers where N is an even number. There are two kinds of operations allowed on the array.Increase the value of any element of an array by 1.If two adjacent elements in the array are consecutive prime number, delete both the element.The task is to find ... Read More
Narendra Kumar
179 Views
Problem statementGiven an array and two numbers M and K. We need to find sum of max M subarrays of size K (non-overlapping) in the array. (Order of array remains unchanged). K is the size of subarrays and M is the count of subarray. It may be assumed that size ... Read More
Narendra Kumar
67 Views
Problem statementGiven a list of permutations of any word. Find the missing permutation from the list of permutations.ExampleIf permutation is = { “ABC”, “ACB”, “BAC”, “BCA”} then missing permutations are {“CBA” and “CAB”}AlgorithmCreate a set of all given stringsAnd one more set of all permutationsReturn difference between two setsExample Live Demo#include ... Read More