×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
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
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
196
Answers
Median Of Running Stream of Numbers in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 14:59:06
In this problem, we are given a data stream that is continuously reading integers. Our task is to create a program that will read elements and calculate the medians for these elements.The Median of an array is the middle element from a sorted sequence(it can be ascending or descending).Calculating medianFor ...
Read More
Median in a stream of integers (running integers) in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 14:51: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 14:44:46
In this problem, we are given an array of n integers and we are adding K elements to the array and then find the median of the resultant array. Given the condition, N+k is odd.Let’s take an example to understand the problem, Input −array = {23, 65, 76, 67} ; ...
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 14:43:03
In this problem, we are given two vessels with capacities x and y and a supply of infinite water. Our task is to create a program that will be able to calculate exactly 1 liter in one vessel. Given the condition that x and y are co-primes. Co-primes also is ...
Read More
Mean of range in array in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 14:39:42
In this problem, we are given an array of n integers and some m querries. Our task is to create a program that calculates the integral value(round down) of the mean of the ranges given by the querries.Let’s take an example to understand the problem, Input −array = {5, 7, ...
Read More
Mean and Mode in SQL Server
MySQL
MySQLi
Database
Narendra Kumar
Published on 10-Feb-2020 14:37: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 14:34:16
In this problem, we are given a 2D array of size n*n. Our task is to create a program that will print the mean and median of the matrix in C++.Mean is the average of the date set. In a matrix mean is the average of all elements of the ...
Read More
Maximum XOR value in matrix in C++
C++
Server Side Programming
Programming
Narendra Kumar
Published on 10-Feb-2020 14:31:37
In this problem, we are given a matrix of size n X n. Our task is to create a program that will calculate the maximum XOR value of a complete row or a complete column.Let’s take an example to understand the problem, Input −N = 3 mat[N][N] = {{4, 9, ...
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 14:28: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 14:26:44
In this problem, we are given two positive integers n and k. Our task is to find maximum xor between 1 to n using maximum X numbersLet’s take an example to understand the problem, Input − n = 5, k = 2Output − 7Explanation −elements till 5 is 1, 2, ...
Read More
1
2
3
4
5
6
7
...
20
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout