Sudhir sharma has Published 1206 Articles

Find value of (n^1 + n^2 + n^3 + n^4) mod 5 for given n in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 07:26:40

158 Views

In this problem, we are given a value n. Our task is to find value of (n^1 + n^2 + n^3 + n^4) mod 5 for given n.Let's take an example to understand the problem, Input : n= 5 Output : 0Explanation −(51 + 52 + 53 + 54) mod ... Read More

Future of Home Automation

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 07:23:07

3K+ Views

Home Automation is creating new automation technologies for houses that will make them smart using internet-based technologies. These homes/houses that use home automation technologies are smart Homes.This field of home automation is fastly emerging in technology making homes safer and better places to live. These features help users to virtually ... Read More

First element that appears even number of times in an array in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 07:22:24

185 Views

In this problem, we are given an array arr[] consisting of N integer values. Our task is to create a program for finding the first element that appears even number of times in an array. If any element exists that satisfies the condition return it otherwise return -1 denoting false.Let's ... Read More

Frugal Number in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 07:15:58

83 Views

In this problem, we are given a positive integer N. Our task is to create a program to check whether the given number is a Frugal number or not.FRUGAL NUMBER − A number whose number of digits is strictly greater than the number of digits in the prime factorization of ... Read More

Flattening a Linked list in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 06:41:02

345 Views

In this problem, we are given linked list consisting of two pointer nodes, right and down.Right node is the main linked list pointer.Down node is for secondary linked list starting with that node.All the linked lists are sorted.Our task is to create a program to flatten a linked list and ... Read More

Flatten a multilevel linked list in C++

sudhir sharma

sudhir sharma

Updated on 31-Jan-2022 12:54:39

402 Views

In this problem, we are given a multilevel linked list. Our task is to create a program to flatten a multilevel linked list.The flattening operation is done in such a way that the first level nodes will occur first in the linked list and then the second level nodes will ... Read More

Fizz Buzz Implementation in C++

sudhir sharma

sudhir sharma

Updated on 31-Jan-2022 12:31:34

5K+ Views

In this problem, we will see the implementation and types of Fizz-Bizz problem.Fizz Buzz − it is a simple programming problem in which the programmer changes the occurrence o all multiples of 3 by ‘Fizz’ and all multiples of 5 by ‘Buzz’ in the numbers from 1 to 100.Let’s take ... Read More

Fitting Shelves Problem in C++

sudhir sharma

sudhir sharma

Updated on 31-Jan-2022 12:22:51

245 Views

In this problem, we are given three integer values W, n, m denoting the length of wall W, size of shelves n, and m. Our task is To Create a Program to solve the Fitting Shelves Problem.We need to find a way to fit shelves in such a way that ... Read More

Find the largest twins in given range in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 11:43:13

138 Views

In this problem, we are given two values lValue and hValue. Our task is to find the largest twins in given range.Two numbers are said to be twin numbers if both of them are prime numbers and the difference between them is 2.Let's take an example to understand the problem, ... Read More

Find the largest three elements in an array in C++

sudhir sharma

sudhir sharma

Updated on 28-Jan-2022 11:38:04

8K+ Views

In this problem, we are given an arr[] consisting of N unsorted elements. Our task is to find the largest three elements in an array.Let's take an example to understand the problem, Input : arr[] = {7, 3, 9, 12, 1} Output : 12, 9, 7Solution ApproachWe basically need to ... Read More

Advertisements