- 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
139 Views
Problem statementGiven an array of N positive integers, the task is to find the smallest positive integer that can be placed between any two elements of the array such that, the sum of elements in the subarray occurring before it, is equal to the sum of elements occurring in the ... Read More
Narendra Kumar
319 Views
Problem statementGiven N monsters, each monster has initial health h[i] which is an integer. A monster is alive if its health is greater than 0.In each turn a random monster kills another random monster, the monster which is attacked, its health reduces by the amount of health of the attacking ... Read More
Narendra Kumar
125 Views
Problem statementGiven an integer N. Find the minimum number of square free divisors.The factorization of N should comprise of only those divisors that are not full squareExampleIf N = 24 then there are 3 square free factors as follows −Factors = 2 * 6 * 2AlgorithmFind all prime factors upto ... Read More
Narendra Kumar
144 Views
Problem statementFind the minimum number of single-digit prime numbers required whose sum will be equal to N.ExampleIf N = 9 then we require 2 prime numbers i.e. 7 and 2 to make sum 9.Example#include using namespace std; bool isValidIndex(int i, int val) { return (i - val) < ... Read More
Narendra Kumar
385 Views
Problem statementGiven a string of consecutive digits and a number Y, the task is to find the number of minimum sets such that every set follows the below rule −Set should contain consecutive numbersNo digit can be used more than once.The number in the set should not be more than ... Read More
Narendra Kumar
133 Views
DescriptionGiven an array of N numbers which have a permutation of first N numbers. In a single operation, any prefix can be reversed. The task is to find the minimum number of such operations such that the numbers in the array are in sorted in increasing order.ExampleIf array is {1, ... Read More
Narendra Kumar
241 Views
Problem statementGiven a string of parentheses. It can container opening parentheses ’(‘ or closing parentheses ‘)’. We have to find minimum number of parentheses to make the resulting parentheses string is valid.ExampleIf str = “((()” then we required 2 closing parentheses i.e ‘))’ at end of stringAlgorithmCount opening parenthesesCount closing ... Read More
Narendra Kumar
944 Views
Problem statementGiven N glasses having water, and a list of each of their capacity. The task is to find the minimum number of bottles required to fill out exactly K glasses. The capacity of each bottle is 100 units.ExampleIf N = 5, K = 4, capacity[] = {1, 2, 3, ... Read More
Narendra Kumar
307 Views
Problem statementGiven a string, find minimum characters to be appended to make a string palindrome.ExampleIf string is abcac then we can make string palindrome by appending 2 highlighed characters i.e. abcacbaAlgorithmCheck if string is already palindrome, if yes then no need to append any characters.One by one remove a character ... Read More
Narendra Kumar
324 Views
Problem statementGiven n strings that are permutations of each other. We need to make all strings same with an operation that moves first character of any string to the end of it.ExampleIf arr[] = {“abcd”, “cdab”} then 2 moves are required.Let us take first string “abcd”. Move character ‘a’ to ... Read More