Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by sudhir sharma
Page 70 of 98
Sum of the series 1^1 + 2^2 + 3^3 + ... + n^n using recursion in C++
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 above series does not have any specific mathematical name but is generally referred to as the power tower series. Below is an example of the power tower series up to n. Example The following example calculates the sum of the given series 1^1 + 2^2 + 3^3 + … ...
Read MoreC++ Program for Cycle Sort?
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 occupy the same place as the original one. Key Points of Cycle Sort Following are the key points: It is optimal in terms of number of memory writes. It minimize the number of memory write to sort (Each value is either written zero times, if ...
Read MoreC++ Program to find whether a number is the power of two?
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 represent the power of two. 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 ... Example Scenario Let's see the following example scenario: Input: 4 Output: yes Explanation: 22 = 4 Input: 16 Output: yes Explanation: 24 = 16 Input: 5 Output: no Explanation: ...
Read MoreC++ mutable keyword?
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 even if the object is of constant type. It is just the opposite of a constant. What is Need of Mutable? Sometimes, it is necessary to modify one or more data members of a class/struct through the constant function, even if you do not want the function to update another ...
Read MoreC++ Program to Add Two Numbers
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 C++ In C++, there are various approaches to add two numbers, each approach using its own cases and advantages. Below are the mentioned list: Using Addition Operator Using User Input Using Increment and Decrement Operators ...
Read MoreBitwise AND of N binary strings in C++
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] & bin[n] Example Let’s take an example to understand the problem. Input − bin[] = {“1001”, “11001”, “010101”} Output − 000001 Explanation Bitwise AND of all binary strings − (1001) & (11001) & (010101) = 000001 To solve this problem, ...
Read More10+ Types of SEO | SEO Techniques to Increase Traffic
Want to know how some Websites fly to the first page of search engines and others fail to rank? The secret is typically rooted in a deeper comprehension of SEO. SEO is not just a single technique but a technique involving several factors aimed at improving your online visibility profile. While on-page SEO focuses on optimizing the website’s inner content and structure, off-page SEO defines the site’s credibility by outside factors, and technical SEO makes the site’s performance optimal. In this article, you will find different types of SEO and why it is important. What is Search Engine Optimization? Search ...
Read MoreParallelism in Query in DBMS
Introduction Are you struggling with slow query execution in your Database Management System (DBMS)? Actually, the fact is, parallelism in DBMS can significantly enhance the performance and speed of your queries. In this article, we'll unravel the concept of parallel query execution, its types - intraquery and interquery parallelism, their benefits and how they can be implemented to optimize your DBMS operations. Intrigued? Let’s dive into the world of efficient data processing! Types of Parallelism in Query Execution in DBMS There are two types of parallelism in query execution in DBMS: intraquery parallelism and interquery parallelism. Intraquery Parallelism Intraquery ...
Read MorePhysical Database Design and Tuning
Introduction Have you been grappled with slow database performance and clueless how to optimize it? Fact is, efficient physical database design and tuning can significantly enhance your database operations. In this enlightening article, we will unravel practical methods that revamp your system's speed by addressing bottlenecks, utilizing proper indexing strategies, optimizing queries, storage management and much more. Overview of Physical Database Design Physical database design plays a crucial role in the overall performance and efficiency of a database system, as it involves making decisions about how the data is stored, organized, and accessed at the physical level. Importance Physical ...
Read MorePredicate Locking
Introduction To ensure both concurrency control and data integrity within database management systems (DBMS). Several locking mechanisms are employed — among them, one is being predicate locking. By utilizing this particular type of lock for protecting specified sections of the stored information from conflicting operations seeking simultaneous access. DBMS guarantees foolproof security measures. By designating a single transaction at a time for reading or modifying a given set of records predicate locking effectively eliminates inconsistencies that might occur due to concurrent access. Moreover. The lock is directly associated with specific predicates. Making it feasible for different subsets of ...
Read More