A Algorithm Example Code In Python