Sudhir sharma has Published 1149 Articles

Sum of the series 1^1 + 2^2 + 3^3 + ... + n^n using recursion in C++

sudhir sharma

sudhir sharma

Updated on 01-Jul-2025 15:32:28

4K+ Views

In this article, we are given a mathematical series (1^1 + 2^2 + 3^3 + … + n^n) defined by a number n which defines the nth terms of the series. This series can be represented mathematically as: $$ \displaystyle\sum\limits_{k=1}^n k^k $$ The ... Read More

C++ Program for Cycle Sort?

sudhir sharma

sudhir sharma

Updated on 30-Jun-2025 13:20:32

500 Views

What is Cycle Sort? Cycle sort is an in-place, unstable sorting algorithm. It is a comparison sort that is theoretically optimal in terms of the total number of writes to the original array, unlike any other in-place sorting algorithm. A sorting algorithm is in-place sorting in which the sorted items ... Read More

C++ Program to find whether a number is the power of two?

sudhir sharma

sudhir sharma

Updated on 30-Jun-2025 13:19:04

2K+ Views

In this article, we will implement a C++ program to find whether a number is a power of two. So, you are given a positive integer n; the task is to find if the given number is a power of 2 or not. Let's see some of the numbers that ... Read More

C/C++ Program for Linear Search?

sudhir sharma

sudhir sharma

Updated on 30-Jun-2025 13:17:38

9K+ Views

What is Linear Search? Linear search is a sequential searching technique in which we start at one end of the list or array and look at each element until the target element is found. It is the simplest searching algorithm, with O(n) time complexity. Example Scenario let's see the following ... Read More

C++ mutable keyword?

sudhir sharma

sudhir sharma

Updated on 30-Jun-2025 11:23:16

5K+ Views

The mutable keyword in C++ is a storage class specifier. It enables non-static, non-const, and non-reference data members (i.e., mutable data member) of a class to be changed even when the object containing them is declared constant. Mutable data members are those members whose values can be changed in runtime ... Read More

Binary Search functions in C++ STL (binary_search, lower_bound and upper_bound)

sudhir sharma

sudhir sharma

Updated on 16-Jun-2025 18:18:23

4K+ Views

Binary search is the fastest algorithm for finding an item from a sorted list of items. C++ STL provides built-in functions to perform binary search operations on sorted ranges of elements. In this article, we will learn binary_search, lower_bound and upper_bound functions in C++ STL. First of all, let's understand ... Read More

C++ Program to Add Two Numbers

sudhir sharma

sudhir sharma

Updated on 09-May-2025 15:26:44

13K+ Views

In this article, we'll show how to add two numbers using C++ and display the result. Adding two numbers is a basic arithmetic operation, meaning we combine their values to get a total. We will see different methods to solve this. Different Ways to Add Two Numbers in ... Read More

The Secret Cybersecurity Battle: Plaintext vs Cleartext - Which Side are You on?

sudhir sharma

sudhir sharma

Updated on 31-Dec-2024 14:39:17

1K+ Views

Don't let hackers compromise your data! Stay informed about the vital distinctions between plaintext and cleartext with our must-read Article on cybersecurity today. Introduction In today's digital world, the importance of data security and encryption cannot be overstated. Among the many concepts in cybersecurity, two terms often used interchangeably—but with ... Read More

Don\'t Fall Victim to Cyber Attacks - The Ultimate Guide to Fortifying System Security

sudhir sharma

sudhir sharma

Updated on 31-Dec-2024 14:32:52

251 Views

Introduction In today's digital age, system security has become a critical aspect of protecting our valuable information and assets from harmful cyber threats. Whether it's safeguarding your personal data or securing an organization's network, cybersecurity plays a pivotal role in every aspect of our lives. As hacking techniques and malware ... Read More

C Program for array rotation?

sudhir sharma

sudhir sharma

Updated on 26-Dec-2024 11:15:54

4K+ Views

Write a C program to left rotate an array by n position. How to rotate left rotate an array n times in C programming. Logic to rotate an array to left by n position in C program.Input: arr[]=1 2 3 4 5 6 7 8 9 10 N=3 Output: 4 ... Read More

Advertisements