- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Pavitra has Published 177 Articles
Pavitra
311 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given an integer n, we need to count the number of 1’s in the binary representation of the numberNow let’s observe the solution in the implementation below −#naive approachExample Live Demo# count ... Read More
Pavitra
198 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a positive integer N, we need to count all possible distinct binary strings available with length N such that no consecutive 1’s exist in the string.Now let’s observe the solution ... Read More
Pavitra
197 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a list, we need to count the inversion required and display it.Inversion count is obtained by counting how many steps are needed for the array to be sorted.Now let’s observe ... Read More
Pavitra
77 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a number X which represents the floor of a matchstick pyramid, we need to display the total number of matchstick required to form a pyramid of matchsticks with x floors.Now ... Read More
Pavitra
2K+ Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given n disks and a series of rods, we need to transfer all the disks to the final rod under the given constraints−We can move only one disk at a time.Only the ... Read More
Pavitra
1K+ Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a set of non-negative integers in an array, and a value sum, we need to determine if there exists a subset of the given set with a sum equal to ... Read More
Pavitra
145 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given an array, we need to sort it using stooge sort.Algorithm1. Check if value at index 0 is greater than value at last index, then swap them. 2. sort the initial ... Read More
Pavitra
2K+ Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a number n, we need to print all primes smaller than or equal to n. Constraint: n is a small number.Now let’s observe the solution in the implementation below −Exampledef ... Read More
Pavitra
1K+ Views
In this article, we will learn about the solution to the problem statement given below.Problem statement− We are given an array, we need to sort it using the concept of recursive insertion sort.Insertion sort works on creating a parallel array in which we manually insert the elements in the specified ... Read More
Pavitra
6K+ Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given an array, we need to sort it using the concept of quicksortHere we first partition the array and sort the separate partition to get the sorted array.Now let’s observe the solution ... Read More
To Continue Learning Please Login
Login with Google