Month: March 2021

Python Example – Write a Python program to sort a list of elements using Time sort

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to sort a list of elements using Time sort.   Sample Solution: Python Code: def binary_search(lst, item, start, end): if start == end: if lst[start] > item: return start else: return start + 1 if start > end: return start mid …

Python Example – Write a Python program to sort a list of elements using Selection sort.

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to sort a list of elements using Selection sort. According to Wikipedia “In computer science, selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse …

Python Example – Write a Python program to sort a list of elements using Radix sort.

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to sort a list of elements using Radix sort. According to Wikipedia “In computer science, radix sort is a non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys by the individual digits which share the same significant …

Python Example – Write a Python program to sort a list of elements using Pancake sort

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to sort a list of elements using Pancake sort. Pancake sorting is the colloquial term for the mathematical problem of sorting a disordered stack of pancakes in order of size when a spatula can be inserted at any point in the …

Python Example – Write a Python program to sort a list of elements using Heap sort.

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to sort a list of elements using Heap sort. In computer science, heapsort (invented by J. W. J. Williams in 1964) is a comparison-based sorting algorithm. Heapsort can be thought of as an improved selection sort: like that algorithm, it divides …

How to write a program to classify Image using Keras and Python

(End-to-End Jupyter Notebook for Citizen Data Scientist & Business Analyst) Write a program to classify Image using Keras and Python. In this end-to-end applied machine learning and data science notebook, the reader will learn: How to write a program to classify Image using Keras and Python. Download   How to write a program to classify …

Write a program to cluster customers in different segments in Python

Write a program to cluster customers in different segments in Python.

Python Example – Write a Python program to sort a list of elements using Cycle sort.

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to sort a list of elements using Cycle sort. Cycle sort is an in-place, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array, unlike any other in-place sorting …

Python Example – Write a Python program to sort a list of elements using Comb sort

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to sort a list of elements using Comb sort. The Comb Sort is a variant of the Bubble Sort. Like the Shell sort, the Comb Sort increases the gap used in comparisons and exchanges. Some implementations use the insertion sort once …

Python Example – Write a Python program to sort a list of elements using Cocktail shaker sort

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to sort a list of elements using Cocktail shaker sort. From Wikipedia, Cocktail shaker sort,[1] also known as bidirectional bubble sort,[2] cocktail sort, shaker sort (which can also refer to a variant of selection sort), ripple sort, shuffle sort,[3] or shuttle …