Insertion sort in python

Insertion sort, is an efficient algorithm for sorting a small number of elements. Insertion sort works the way many people sort a hand of playing cards. We start with an empty left hand and the cards face down on the table. We then remove one card at a time from the table and insert it into the correct position in the left hand. To find the correct position for a card, we compare it with each of the cards already in the hand, from right to left.
Read more →

Bubble-sort in python

Read more →

longest palindrome in a string

Read more →

Factorial in python

Read more →