Category Archives: Python Programming

Python Bubble Sort

Here you will learn about Python bubble sort. In Bubble Sort, all we have to do is pick the first two elements of the array and compare them if first one is greater than the second one then swap them. After it, pick next two elements and compare them and so on. After travelling the… Read More »

Python Insertion Sort

Here you’ll learn about Python insertion sort algorithm. In terms of performance Insertion sort is not the best sorting algorithm. But it is little bit more efficient then the Selection sort and Bubble sort. To understand the Insertion Sort algorithm easily, we’ll start with an example. Also Read: Python Selection Sort Python Insertion Sort Example Let’s… Read More »

Python Selection Sort

Here you’ll learn about python selection sort algorithm with program example. Selection sort is one of the easiest sorting algorithm out there. In Selection sort, to sort an unsorted array, all we have to do is find the minimum in the array and swap it with the first element in the unsorted array. After each… Read More »

Python Binary Search

Here you will learn about python binary search with program and algorithm. In linear search, we have to check each node/element. Because of this, time complexity increases. To reduce this time complexity, we use Binary search. In Binary search half of the given array will be ignored after just one comparison. The main point to… Read More »

Python Linear Search

Here you will get program for linear search in python. Linear search is one of the simplest searching algorithm in which targeted item in sequentially matched with each item in a list. It is worst searching algorithm with worst case time complexity O (n). Below is its implementation. Image Source Also Read: Python Binary Search… Read More »

Python Program to Check Palindrome Number

Here you will get python program to check palindrome number. A number is said to be palindrome if it is equal to its reverse. For example 121, 555, etc are palindrome while 124, 367, etc are not. Python Program to Check Palindrome Number

Output enter a number: 12321 number is palindrome Comment below if… Read More »

Python Program to Check Armstrong Number

Here you will get python program to check armstrong number. A number is said to be an armstrong number if sum of its digits raised to the power n is equal to itself. Here n is total digits in number. For example 370 is armstrong number. Here n = 3, so 33 + 73 + 03 = 27… Read More »