Given an array of N elements, the task is to find the minimum value of K such that Bitwise XOR of K with all array elements is minimum Input: arr[] 16 12 Read more →
Negative numbers in all number systems can be represented in complementary form. For any number system there exist two types of complements and they are: Base complement (Base-1) complement 1. (Base-1) Complement Read more →
In this technological and digital age where everything is automated. We should prefer something which saves time and space and makes our work easy. Lucky for us C++ programmers, we have switch Read more →
You are given n commands. The task is to implement a stack that performs operations based on the following commands: push x: Push integer x onto the top of the stack. pop: Read more →
Given an Array consisting of N integers, Count the number of contiguous subarrays where each element in the subarray appears 2 or more times. Examples : Input : n = 3 arr Read more →
Two numbers: m and n are given. The size of these numbers is 32-bit long. You are also given two-bit positions: i and j. You have to set all bits between i Read more →
When you start to research IT and CS and you find out everything you want to do is based on Data Structure and Algorithm so what is Data Structure? Data Structure is Read more →
About Java : The java programming language was developed by Sun Microsystems in the early 1990s. Java is a simple programming language, efficient, general-purpose language. Java is portable. The same java application Read more →
We have to print the pattern as given in the example below : Examples: Input : 4 Output : 1 1 12 21 123 321 12344321 123 321 12 21 1 1 Read more →
Programming has never been easier. Even though you may have mastered a particular programming language, there might still be some concepts that may make you dizzy on reading it. This article contains Read more →