In this tutorial we will see how to use a Python library called Biopython and we will do some exercises on Greedy Algorithms from Hackerrank.

Biopython

Open this Gdrive folder, open the Jupiter Notebook and let us execute the command together.

Then, let’s do the exercise at the bottom of the notebook.

Hackerrank

Complete the following challenges from Hackerrank:

  1. Minimum absolute difference in array (hint: use abs() Python function to compute the absolute value)
  2. Marc’s Cakewalk (hint: use max() Python function to find the maximum value in a list, list.index(<value>) to find the index of an element given its value in a list and list.pop(<index>) to remove an element from a list given its index)
  3. Priyanka and Toys (hint: use min() Python function to find the minimum value in a list, list.index(<value>) to find the index of an element given its value in a list and list.pop(<index>) to remove an element from a list given its index)