- 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
308 Views
Problem statementGiven an array of non-negative integers and an integer k, find the subset of maximum length with bitwise OR equal to k.ExampleIf given input array is = [1, 4, 2] and k = 3 then output is: [1, 2] The bitwise OR of 1 and 2 equals 3. It ... Read More
Narendra Kumar
83 Views
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
Narendra Kumar
1K+ Views
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
Narendra Kumar
637 Views
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
Narendra Kumar
191 Views
Problem statementGiven a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum of widths of all levels.Consider below tree − 10 / \ 7 4 / \ \ ... Read More
Narendra Kumar
320 Views
Problem statementGiven a string consisting of only A’s and B’s. We can transform the given string to another string by toggling any character. Thus many transformations of the given string are possible. The task is to find the Weight of the maximum weight transformation.Weight of a sting is calculated using ... Read More
Narendra Kumar
467 Views
Problem statementGiven two sorted arrays such the arrays may have some common elements. Find the sum of the maximum sum path to reach from beginning of any array to end of any of the two arrays. We can switch from one array to another array only at common elements. Note ... Read More
Narendra Kumar
174 Views
Problem statementConsider a n*n matrix. Suppose each cell in the matrix has a value assigned. We can go from each cell in row i to a diagonally higher cell in row i+1 only [i.e from cell(i, j) to cell(i+1, j-1) and cell(i+1, j+1) only]. Find the path from the top ... Read More
Narendra Kumar
138 Views
Problem statementGiven a right triangle of numbers, find the largest of the sum of numbers that appear on the paths starting from the top towards the base, so that on each path the next number is located directly below or below-and-one-place-to-the-rightExampleIf given input is: 3 4 5 1 10 7 ... Read More
Narendra Kumar
206 Views
Problem statementGiven an array of N numbers, the task is to find the maximum sum that can be obtained by adding numbers with the same number of set bitsExampleIf input array is {2, 5, 8, 9, 10, 7} then output would be 14 −Number of set bits in 2 is ... Read More