Rinish Patidar has Published 56 Articles

Multiply the given number by 2 such that it is divisible by 10

Rinish Patidar

Rinish Patidar

Updated on 14-Mar-2023 14:55:40

215 Views

This problem statement says that we are allowed to perform only one operation i.e. multiply the given number by 2 such that it is divisible by 10. We will be given a number say n. The only operation that we can perform on a given number is that we can ... Read More

Minimum steps in which N can be obtained using addition or subtraction at every step

Rinish Patidar

Rinish Patidar

Updated on 14-Mar-2023 14:52:03

218 Views

From the above problem statement, our task is to get the minimum steps in which a given number N can be obtained using addition or subtraction at every step. We can understand that we need to print the minimum number of steps that we can perform and sequence of the ... Read More

Largest of two distinct numbers without using any conditional statements or operators

Rinish Patidar

Rinish Patidar

Updated on 14-Mar-2023 14:33:44

1K+ Views

In this problem set, we will be given any two distinct positive numbers, let’s say a and b, we need to return the largest of two distinct numbers without using any conditional statements (if-else) or any operators(, ==, !=, etc.) in c++. The main difficulty of the problem includes that ... Read More

Find the Smallest Positive Number Missing From an Unsorted Array

Rinish Patidar

Rinish Patidar

Updated on 14-Mar-2023 14:31:04

2K+ Views

Our objective is to find the smallest positive number that is missing from an unsorted array. We will be given an array a[] of both positive and negative numbers, we need to get the smallest positive number that is missing from an unsorted array in this problem. We can modify ... Read More

Divide two integers without using multiplication, division and mod operator

Rinish Patidar

Rinish Patidar

Updated on 14-Mar-2023 14:24:05

4K+ Views

In this problem, we simply need to divide two integers without using multiplication, division and mod operator. Though we can use addition or multiplication or bit manipulation. The problem statement states that we will be given two integers x and y. Without using multiplication, division or mod operator, we need ... Read More

Centered Dodecagonal Number

Rinish Patidar

Rinish Patidar

Updated on 14-Mar-2023 14:07:38

141 Views

A figurative number that depicts a dodecagon is called a dodecagonal number. The Centered Dodecagonal number is represented by a dot in the centre and other dots encircling it in the successive dodecagonal (i.e. a 12-sided polygon) layers. Centered Dodecagonal number can be better explained with the below figure. ... Read More

Advertisements