Sudhir sharma has Published 1206 Articles

Bitwise OR (or - ) of a range in C++

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:57:22

636 Views

In this problem, we are given two integer values a and b. And our task is to find the bitwise OR (|) of range from a to b. This means we will have to find the value of a | a+1 | a+2 | … b-1 | b.Let’s take an ... Read More

Bitwise AND of sub-array closest to K in C++

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:55:34

1K+ Views

In this problem, we are given an array arr[] of size n and an integer k. Our task is to find the subarray within from index i to j and compute bitwise AND of all its elements. After this print minimum value of abs(K- (bitwise AND of subarray)).Let’s take an ... Read More

Bitwise AND of N binary strings in C++

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:53:08

558 Views

In this problem, we are given an array bin[] of size n of binary strings. Our task is to create a program to find the Bitwise AND (&) of N binary strings.Here, we will take all numbers and find the bitwise AND of them i.e. bin[0] & bin[1] &... bin[n-2] ... Read More

Bitwise and (or &) of a range in C++

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:49:12

132 Views

In this problem, we are given two integer values a and b. And our task is to find the bitwise and (&) of range from a to b. This means we will have to find the value of a & a+1 & a+2 & … b-1 & b.Let’s take an ... Read More

Bits manipulation (Important tactics) in C++

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:47:30

3K+ Views

Let’s first recall the about bits and the bitwise operator is short.Bit is a binary digit. It is the smallest unit of data that is understandable by the computer. In can have only one of the two values 0 (denotes OFF) and 1 (denotes ON).Bitwise operators are the operators that ... Read More

Bitonic Sort in C++

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:44:00

763 Views

The bitonic sort is a parallel sorting algorithm that is created for best implementation and has optimum usage with hardware and parallel processor array.It is not the most effective one though as compared to the merge sort. But it is good for parallel implementation. This is due to the predefined ... Read More

Bitmasking and Dynamic Programming in C++

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:41:03

3K+ Views

First, we will learn about bitmasking and dynamic programming then we will solve a problem related to it that will solve your queries related to the implementation.Bitmask also known as mask is a sequence of N -bits that encode the subset of our collection. The element of the mask can ... Read More

C Programming Language Standard

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:35:32

975 Views

In this problem, we will learn about the standards that are defined in the C programming language. These are those standard ways in which the program is to be ideally compiled by the compiler as defined by the development community.To understand what I am saying take an easy example of ... Read More

C program to store Student records as Structures and Sort them by Name

sudhir sharma

sudhir sharma

Updated on 05-Aug-2020 07:34:38

2K+ Views

In this problem, we are given a student’s record which contains student_id, student_name, student_percentage. Our task is to create a C program to store student records as structure and sort them by name.Let’s take an example to understand the problem, Input − student record ={{ student_id = 1, student_name = ... Read More

C Program to Sort an array of names or strings

sudhir sharma

sudhir sharma

Updated on 18-Jul-2020 06:19:21

1K+ Views

In this problem, we are given an array of string. Our task is to create a c program to sort an array of name or string. This program will sort all the names we have given in the input in ascending alphabetical order.Let’s take an example to understand the problem, ... Read More

Advertisements