- 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
379 Views
Problem statementGiven an array of size n, the task iss to find the minimum number of steps required to make all the elements of the array divisible by 4. A step is defined as removal of any two elements from the array and adding the sum of these elements to ... Read More
Narendra Kumar
764 Views
Problem statementGiven a string containing characters as integers only. We need to delete all character of this string in a minimum number of steps where in one step we can delete the substring which is a palindrome. After deleting a substring remaining parts are concatenated.ExampleIf input string is 3441213 then ... Read More
Narendra Kumar
227 Views
Problem statementGiven a string, we need to find the minimum number of rotations required to get the same stringExampleIf input string is “bbbbb” then minimum 1 rotation is requiredAlgorithm1. Initialize result = 0 2. Make a temporary string equals to original string concatenated with itself. 3. Take the substring of ... Read More
Narendra Kumar
165 Views
Problem statementGiven an array arr[] of N integers. We need to write a program to find minimum number of elements needed to be removed from the array, so that sum of remaining element is odd.ExampleIf input array is {10, 20, 30, 5, 7} then we need to remove one element ... Read More
Narendra Kumar
159 Views
Problem statementGiven an array arr[] of N integers. We need to write a program to find minimum number of elements needed to be removed from the array, so that sum of remaining element is even.ExampleIf input array is {10, 20, 30, 5} then we need to remove one element i.e. ... Read More
Narendra Kumar
77 Views
Problem statementGiven two positive integers N and K. Find the minimum number of digits that can be removed from the number N such that after removals the number is divisible by 10K. Print -1 if it is impossible.ExampleIf N = 10203027 and K = 2 then we have to remove ... Read More
Narendra Kumar
158 Views
Problem statementGiven a string S, we have to find minimum characters that we can remove to make any permutation of the string S a palindromeExampleIf str = “abcdba” then we remove to 1 character i.e. either ‘c’ or ‘d’.Algorithms1. There can be two types of a palindrome, even length, and ... Read More
Narendra Kumar
96 Views
Problem statementThere are many points in two-dimensional space which need to be visited in a specific sequence.Path from one point to other is always chosen as shortest path and path segments are always aligned with grid lines.We are given the path which is chosen for visiting the points. We need ... Read More
Narendra Kumar
440 Views
Problem statementGiven an array of N distinct elements, find the minimum number of swaps required to sort the arrayExampleIf array is {4, 2, 1, 3} then 2 swaps are requiredSwap arr[0] with arr[2]Swap arr[2] with arr[3}Algorithm1. Create a vector of pair in C++ with first element as array alues and ... Read More