Sudhir sharma has Published 1149 Articles

Freeware v/s Shareware

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 10:25:12

7K+ Views

Softwares are a set of programs that are created in order to perform a specific computer task. Generally, the software is created by developers to solve the needs of its users. And based on the restrictions that are imposed on software. Basically, there are a few categories based on licensing. ... Read More

Friends Pairing Problem in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 10:21:49

665 Views

In this problem, we are given a positive integer N denoting the number of friends in a group. Our task is to create a program to solve the Friends Pairing Problem.Each friend of the group can either remain single or can pair up with one other friend. The pairing of ... Read More

Finding n-th number made of prime digits (2, 3, 5 and 7) only in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 10:09:35

589 Views

In this problem, we are given a number N. Our task is to finding n-th number made of prime digits (2, 3, 5 and 7) only.The series consisting of prime digits only (2, 3, 5, 7) is, 2, 3, 5, 7, 22, 23, 25, 27, 32, 33...Let's take an example ... Read More

Format String Vulnerability and Prevention with Example in C

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 10:08:09

819 Views

Format String − It is an ASCII string that is used for formatting strings. It is an ASCII string consisting of texts and formatting parameters.For formatting, the program’s output, there are various format strings in C.FORMAT STRING VULNERABILITIESThese are bugs that arise due to errors in programming that might be ... Read More

Finding Median in a Sorted Linked List in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 10:05:39

485 Views

In this problem, we are given a sorted linked list consisting of N elements. Our task is to finding Median in a Sorted Linked List.Sorted Linked List is a simple linked list in which all elements are sorted in a specific order. Example − 4 -> 6 -> 7 -> ... Read More

Form the smallest number using at most one swap operation in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 10:01:59

427 Views

In this problem, we are given a positive integer. Our task is to create a program to form the smaller number using at most one swap operation.We will be creating a new number using the digits of the existing number. The smallest number formed can have only one digit swapped ... Read More

Finding inverse of a matrix using Gauss Jordan Method in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 10:01:21

3K+ Views

In this problem, we are given an 2D matrix mat[][]. Our task is to find inverse of a matrix using Gauss Jordan Method.Now, lets understand the basics of the problem, MATRIX is a two dimensional array of numbers.Example$\begin{bmatrix}2&5&4 \1&6&7 \9&3&8\end{bmatrix}$Inverse of Matrix [A-1] −It is an operation performed on square ... Read More

First and Last Three Bits in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 09:51:49

243 Views

In this problem, we are given a number N. Our task is to find the decimal conversion of the fist three and last three bits for the given integer values N.Let's take an example to understand the problem, Input : 57 Output : 71Solution ApproachA simple solution is by changing ... Read More

Finding the power of prime number p in n! in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 09:48:43

245 Views

In this problem, we are given a number n and a prime number p. Our task is to find the power of prime number p in n!Let's take an example to understand the problem, Input : n = 6, p = 2 Output : 4Solution ApproachA simple solution to the ... Read More

Finding n-th term of series 3, 13, 42, 108, 235... in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 09:45:10

190 Views

In this problem, we are given a number n. Our task is to find the n-th term of series 3, 13, 42, 108, 235...Let's take an example to understand the problem, Input : 5 Output : 235Solution ApproachThe series can be represented as the sum of cubes of first n ... Read More

Advertisements