
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Arnab Chakraborty has Published 4293 Articles

Arnab Chakraborty
102 Views
Suppose we have two integers N and K. We have to find first permutation of 2N number of natural numbers, such that the following equation is satisfied.$$\displaystyle\sum\limits_{i=1}^N\lvert A_{2i-1}-A_{2i}\rvert+\lvert \displaystyle\sum\limits_{i=1}^N A_{2i-1}-A_{2i} \rvert=2K$$The value of K should be less than or equal to N. For example, if N = 4 and K ... Read More

Arnab Chakraborty
481 Views
Suppose we have an array A with n elements. We have to find the local minima of the array. In array A, the element A[x] is said to be local minima if it is less than or equal to both of its neighbors. For corner elements only one neighbor will ... Read More

Arnab Chakraborty
465 Views
Here we will see how to compare two strings in C++. The C++ has string class. It also has the compare() function in the standard library to compare strings. But here we will use the conditional operators like ==, !=, , =. These operators check the strings character by characters. ... Read More

Arnab Chakraborty
122 Views
Here we will see some program that will return different results if they are compiled in C or C++ compilers. We can find many such programs, but here we are discussing about some of them.In C and C++, the character literals are treated as different manner. In C, they are ... Read More

Arnab Chakraborty
399 Views
In this section we will see what is the Chrono library in C++. This Chrono library is used for date and time. Timers and clocks are different in different systems. So if we want to improve time over precision we can use this library.In this library, it provides precision-neutral concept, ... Read More

Arnab Chakraborty
960 Views
In C++, we use the getline() function to read lines from stream. It takes input until the enter button is pressed, or user given delimiter is given. Here we will see how to take the new line character as input using the getline() function. Let us see the following implementation ... Read More

Arnab Chakraborty
1K+ Views
Suppose we have a set, then we have to traverse the set in reverse direction. So if the set is like S = [10, 15, 26, 30, 35, 40, 48, 87, 98], then the output will be: 98 87 48 40 35 30 26 15 10.To traverse in reverse order, ... Read More

Arnab Chakraborty
974 Views
Here we will see how to reverse an array using STL functions in C++. So if the array is like A = [10, 20, 30, 40, 50, 60], then the output will be B = [60, 50, 40, 30, 20, 10]. To reverse we have one function called reverse() present ... Read More

Arnab Chakraborty
531 Views
Suppose we have one STL list in C++. There are few elements. We have to insert a new element into the list. We can insert at the end, or beginning or at any position. Let us see one code to get better understanding. To insert at beginning we will use ... Read More

Arnab Chakraborty
384 Views
Here we will see how to find the sum of all element of an array. So if the array is like [12, 45, 74, 32, 66, 96, 21, 32, 27], then sum will be: 405. So here we have to use the accumulate() function to solve this problem. This function ... Read More