Back to Browse

Program Bubble sort | PYTHON CODE | TCS CODING QUESTIONS

634 views
Dec 7, 2018
4:34

Hi Guys, I have created this program for Bubble sort in Python. I made use of 'Range' keyword for listing the numbers in sequence and 'swap' number code to swap if predecessor is greater than successor. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- BUBBLE sort: Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Range : range(start_point,end_point,step) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Swap function: Temp = a a = b b = Temp ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Hope you liked my this video Thank you!!! ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- My Previous video link (TO CHECK THE STRING IS ANAGRAM OR NOT): https://youtu.be/tvn7JpUwLiM (HALF ASCENDING AND HALF DESCENDING): https://youtu.be/A8wepOtaISE (PROGRAM TO CALCULATE ANGLE BETWEEN CLOCK HAND): https://youtu.be/4qMTgamitYk (PRINT | H$w a&e YOU): https://youtu.be/K2dRqzcdZqA (Fortune Teller Program): https://youtu.be/frKD11ot7HE ------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------- #pythonprogramming #pythonbasic #i_extreme_coder ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Download

0 formats

No download links available.

Program Bubble sort | PYTHON CODE | TCS CODING QUESTIONS | NatokHD