
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 191 Articles

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
332 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
218 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
285 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
124 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

Narendra Kumar
293 Views
Problem statementGiven two integer arrays even [] and odd [] which contains consecutive even and odd elements respectively with one element missing from each of the arrays. The task is to find the missing elements.ExampleIf even[] = {10, 8, 6, 16, 12} and odd[] = {3, 9, 13, 7, 11} ... Read More

Narendra Kumar
216 Views
Problem statementGiven a Tree where every node contains variable number of children, convert the tree to its mirrorExampleIf n-ary tree is −Then it’s mirror is −Example Live Demo#include using namespace std; struct node { int data; vectorchild; }; node *newNode(int x) { node *temp = new node; ... Read More

Narendra Kumar
148 Views
Problem statementGiven an array of integers. Find the pair in an array which has minimum XOR valueExampleIf arr[] = {10, 20, 30, 40} then minimum value pair will be 20 and 30 as (20 ^ 30) = 10. (10 ^ 20) = 30 (10 ^ 30) = 20 (10 ^ ... Read More

Narendra Kumar
154 Views
Problem statementGiven two integer p and q, the task is to find the minimum possible number x such that q % x = 0 and x % p = 0. If the conditions aren’t true for any number, then print -1.ExampleIf p = 3 and q = 66 then answer ... Read More