Sudhir sharma has Published 1206 Articles

Find the number of stair steps using C++

sudhir sharma

sudhir sharma

Updated on 11-Feb-2022 11:13:14

205 Views

In this problem, we are given a number N denoting the number of bricks provided to create the stair. Our task is to find the number of stair steps.Using the given bricks, we need to create a stair step. Each step takes one more brick that the last step. And ... Read More

Find the number of Islands Using Disjoint Set in C++

sudhir sharma

sudhir sharma

Updated on 11-Feb-2022 10:58:15

400 Views

In this problem, we are given a 2D binary matrix. Our task is to find the number of islands Using DFS.Island is a ground of 1 or more connected 1’s in the matrix.Let’s take an example to understand the problem, Inputbin[][] = {{ 1 0 0 0}    {0 1 ... Read More

Find the number of islands Using DFS in C++

sudhir sharma

sudhir sharma

Updated on 11-Feb-2022 10:27:51

187 Views

In this problem, we are given a 2D binary matrix. Our task is to Find the number of islands Using DFS.Island is a ground of 1 or more connected 1’s in the matrix.Let’s take an example to understand the problem, Input : bin[][] = {{ 1 0 0 0}   ... Read More

Program to find Nth Even Fibonacci Number in C++

sudhir sharma

sudhir sharma

Updated on 11-Feb-2022 07:17:27

513 Views

In this problem, we are given an integer value N. Our task is to find Nth Even Fibonacci Number.Fibonacci Series generates subsequent number by adding two previous numbers. The Fibonacci series starts from two numbers − F0 & F1. The initial values of F0 & F1 can be taken 0, ... Read More

First X vowels from a string in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 11:29:38

173 Views

In this problem, we are given string str[] of size N and an integer X. Our task is to create a program to print First X vowels from a string.We will print first X vowels from the string and if less than X vowels are present, print -1.Let's take an ... Read More

First string from the given array whose reverse is also present in the same array in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 11:25:56

118 Views

In this problem, we are given an array of string str[] of size N. Our task is to create a program for finding the first string from the given array whose reverse is also present in the same array.Let's take an example to understand the problem, Input: str[] = ["python", ... Read More

First non-repeating in a linked list in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 11:19:56

159 Views

In this problem, we are given a linked list LL of size N. Our task is to create a program for finding non-repeating in linked list.Linked list is a sequence of data structures, which are connected together via links.Let's take an example to understand the problem, Input: LL = 4 ... Read More

First negative integer in every window of size k in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 11:16:06

842 Views

In this problem, we are given an array arr[] consisting of N integer values and a window of size N. Our task is to create a program for finding the first negative integer in every window of size k. We will be printing the first negative number if it exists ... Read More

Floyd's triangle in PL/SQL

sudhir sharma

sudhir sharma

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

426 Views

PL/SQL is a combination of SQL along with the procedural features of programming languagesFLOYD’s triangle − it is a triangle formed by natural numbers. It is the triangle formed by filling numbers in rows starting from 1 at the top-left corner. It is a right-angled triangle i.e. the count of ... Read More

First element greater than or equal to X in prefix sum of N numbers using Binary Lifting in C++

sudhir sharma

sudhir sharma

Updated on 01-Feb-2022 10:56:48

195 Views

In this problem, we are given an array arr[] consisting of N numbers and an integer value x. Our task is to create a program for finding the first element greater than or equal to X in the prefix sum of N numbers using Binary Lifting.Prefix Sum of elements of ... Read More

Advertisements