- 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
926 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 insert an element in a list without changing sorted orderThere are two approaches as discussed below−Approach 1: The brute-force methodExample Live Demodef insert(list_, n): # search ... Read More
Pavitra
512 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a set, we need to list all the subsets of size nWe have three approaches to solve the problem −Using itertools.combinations() methodExample Live Demo# itertools module import itertools def findsubsets(s, n): ... 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, we need to check that the number is a power of two or not.We can solve this using two approaches as discussed below.Approach 1: Taking the log of the ... Read More
Pavitra
222 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given al list, we need to display the smallest number available in the listHere we can either sort the list and get the smallest element or use the built-in min() function ... Read More
Pavitra
874 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 calculate the largest element of the list.Here we will take the help of built-in functions to reach the solution of the problem statementUsing sort() functionExample# list ... Read More
Pavitra
909 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 calculate the largest element of the array.Here we use the bruteforce approach in which we compute the largest element by traversing the whole loop and get ... Read More
Pavitra
465 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a string, we need to count the number of uppercase and lowercase characters present in the string without using the inbuilt functionThis can be easily solved by using islower() and isupper() ... Read More
Pavitra
196 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given distance in kilometers and we need to convert it into milesAs we know that 1 kilometer equals 0.62137 miles.Formula UsedMiles = kilometer * 0.62137Now let’s observe the concept in the implementation ... Read More
Pavitra
337 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a hexadecimal string, we need to convert it into its decimal equivalent.We have two approaches to solve the problem−Brute-force ApproachUsing Built-in moduleBrute-Force MethodHere we take the help of explicit type casting ... Read More
Pavitra
156 Views
In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a list iterable, we need to convert it into a string type iterable.There are four approaches to solve the given problem. Let’s see them one by one−Brute-force ApproachExample Live Demodef listToString(s): ... Read More