Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
Android
Python
C Programming
C++
C#
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
196
Answers
Median Of Running Stream of Numbers in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 10:29:06
Problem statementGiven that integers are read from a data stream. Find median of elements read so for in an efficient wayAfter reading 1st element of stream - 10 -> median - 10After reading 2nd element of stream - 10, 20 -> median - 15After reading 3rd element of stream - ...
Read More
Median in a stream of integers (running integers) in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 10:21:31
Problem statementGiven that integers are read from a data stream. Find median of elements read so for in an efficient wayAfter reading 1st element of stream - 10 -> median - 10After reading 2nd element of stream - 10, 20 -> median - 15After reading 3rd element of stream - ...
Read More
Median after K additional integers in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 10:14:46
Problem statementGiven an array of n integers. We are allowed to add k additional integer in the array and then find the median of the resultant array. We can choose any k values to be addedIf input array is arr[] = { 5, 6 } and k = 1 then ...
Read More
Measure one litre using two vessels and infinite water supplys in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 10:13:03
Problem statementThere are two vessels of capacities ‘a’ and ‘b’ respectively. We have an infinite water supply. Give an efficient algorithm to make exactly 1 liter of water in one of the vessels. You can throw all the water from any vessel at any point in time. Assume that ‘a’ ...
Read More
Mean of range in array in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 10:09:42
Problem statementGiven an array of n integers. You are given q queries. Write a program to print floor value of mean in range l to r for each query in a new lineIf given input array is arr[] = {1, 2, 3, 4, 5} and queries are −q = 3 ...
Read More
Mean and Mode in SQL Server
MySQL
MySQLi
Database
Narendra Kumar
Published on 10-Feb-2020 10:07:55
Problem statementMean is the average of the given data set calculated by dividing the total sum by the number of values in the data set.Mode of a data set is the value that appears most frequently in a series of dataIf our dataset is {1, 2, 3, 4} then mean ...
Read More
Mean and Median of a matrix in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 10:04:16
Problem statementGiven a sorted matrix of size n*n. Calculate the mean and median of the matrixConsider below matrix −Matrix[3][3] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} } In above matrix Mean = 3 and Median = 5Algorithms1. Mean of matrix is (sum of ...
Read More
Maximum XOR value in matrix in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 10:01:37
Problem statementGiven a square matrix (N X N), the task is to find the maximum XOR value of a complete row or a complete columnConsider below matrix −matrix[3][3] = { {1, 2, 4}, {10, 4, 5}, {1, 16, 4} }; Output: 22We get this maximum XOR value ...
Read More
Maximum XOR value of a pair from a range in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 09:58:34
Problem statementGiven a range [L, R], we need to find two integers in this range such that their XOR is maximum among all possible choices of two integersIf the given range is L = 1 and R = 21 then the output will be 31 as − 31 is XOR ...
Read More
Maximum XOR using K numbers from 1 to n in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 09:56:44
Problem statementYou are given two positive integer n and k. You have to calculate the maximum possible XOR value of at most k-elements from 1 to nIf n = 7 and k = 3 then output will be 7We can select 1, 2, 4 for maximum XOR-valueAlgorithm1. for a given ...
Read More
1
2
3
4
5
6
7
...
20
Next
Advertisements