
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
170 Views
DescriptionThere is an array of (2 * n – 1) integers. We can change sign of exactly n elements in the array. In other words, we can select exactly n array elements, and multiply each of them by -1. Find the maximum sum of the array.ExampleIf input array is {-2, ... Read More

Narendra Kumar
225 Views
Problem statementGiven an array, arr[] find the maximum value of (arr[i] – i) – (arr[j] – j) where i is not equal to j. Where i and j vary from 0 to n-1 and n is the size of input array arr[].If the input array is {7, 5, 10, 2, ... Read More

Narendra Kumar
307 Views
Problem statementGiven three non-zero integers a, b and c. The task is to find the maximum value possible by putting addition and multiplication signs between them in any order.Please note that rearrangement of integers is allowed but addition and multiplication sign must be used once.If a = 1, b = ... Read More

Narendra Kumar
448 Views
Problem statementGiven an array of N integers. You are allowed to rearrange the elements of the array. The task is to find the maximum value of Σarr[i]*i, where i = 0, 1, 2, .. n – 1.If input array = {4, 1, 6, 2} then the maximum sum will be ... Read More

Narendra Kumar
186 Views
Problem statementGiven a rod of length L, the task is to cut the rod in such a way that the total number of segments of length p, q and r is maximized. The segments can only be of length p, q, and rIf l = 15, p = 2, q ... Read More

Narendra Kumar
163 Views
Problem statementGiven an unsigned number, find the maximum number that could be formed by using the bits of the given unsigned numberIf the input number is 8 then its binary representation is−00000000000000000000000000001000To maximize it set MSB to 1. Then number becomes 2147483648 whose binary representation is−10000000000000000000000000000000Algorithms1. Count number of set ... Read More

Narendra Kumar
333 Views
Problem statementGiven an array arr[] of N elements and an integer K where K < N. The task is to insert K integer elements to the same array such that the median of the resultant array is maximizedIf input array is {1, 3, 2, 5} and k = 3 then ... Read More

Narendra Kumar
251 Views
Problem statementGiven an array arr[] of N elements and an integer K where K < N. The task is to insert K integer elements to the same array such that the median of the resultant array is maximizedIf input array is {1, 3, 2, 5} and k = 3 then−Sorted ... Read More

Narendra Kumar
302 Views
Problem statementGiven an array arr[] of N integers. The task is to first find the maximum sub-array sum and then remove at most one element from the sub-array. Remove at most a single element such that the maximum sum after removal is maximized.If given input array is {1, 2, 3, ... Read More

Narendra Kumar
823 Views
Problem statementGiven an array of N integers. The bitwise OR of all the elements of the array has to be maximized by performing one task. The task is to multiply any element of the array at-most k times with a given integer xIf input array is {4, 3, 6, 1}, ... Read More