- 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
202 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
678 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
Narendra Kumar
647 Views
Problem statementGiven a binary array, find the maximum number of zeros in an array with one flip of a subarray allowed. A flip operation switches all 0s to 1s and 1s to 0sIf arr1= {1, 1, 0, 0, 0, 0, 0}If we flip first 2 1’s to 0’s, then we ... Read More
Narendra Kumar
825 Views
Problem statementGiven two arrays with size n, maximize the first array by using the elements from the second array such that the new array formed contains n greatest but unique elements of both the arrays giving the second array priority i.e. all elements of the second array appear before the ... Read More
Narendra Kumar
287 Views
Problem statementGiven an array of size n and a number k. We have to modify an array k number of times.Modify array means in each operation we can replace any array element arr[i] by negating it i.e. arr[i] = -arr[i]. The task is to perform this operation in such a ... Read More
Narendra Kumar
367 Views
Problem statementGiven an array of integers, a number and a maximum value, the task is to compute the maximum value that can be obtained from the array elements. Every value on the array traversing from the beginning can be either added to or subtracted from the result obtained from the ... Read More
Narendra Kumar
121 Views
Problem statementGiven a number maximize it by swapping bits at its extreme positions i.e. at first and last position, second and second last position and so on.If the input number is 8 then its binary representation is−00000000 00000000 00000000 00001000After swapping bits at extreme positions number becomes −00010000 00000000 00000000 ... Read More
Narendra Kumar
200 Views
DescriptionGiven a set of N intervals, the task is to find the maximal set of mutually disjoint intervals. Two intervals [i, j] & [k, l] are said to be disjoint if they do not have any point in commonIf intervals are {{10, 20} {23, 35}, {15, 21}, {37, 41}} then ... Read More
Narendra Kumar
125 Views
Problem statementGiven a matrix A of integers of size NxN. The task is to find the minimum sum of a falling path through A.A falling path will start at any element in the first row and ends in last row.It chooses one element from each next row. The next row’s ... Read More
Narendra Kumar
89 Views
Problem statementGiven a binary string, the task is to count the minimum steps to remove substring 010 from this binary stringExampleIf input string is 010010 then 2 steps are requiredConvert first 0 to 1. Now string becomes 110010Convert last 0 to 1. Now final string becomes 110011Algorithm1. Iterate the string ... Read More