kumaraswins / Coursera-Algorithm-Toolbox

The course covers basic algorithmic techniques and ideas for computational problems arising frequently in practical applications: sorting and searching, divide and conquer, greedy algorithms, dynamic programming. We will learn a lot of theory: how to sort data and how it helps for searching; how to break a large problem into pieces and solve them recursively; when it makes sense to proceed greedily; how dynamic programming is used in genomic studies. You will practice solving computational problems, designing new algorithms, and implementing solutions efficiently (so that they run in less than a second).

Repository from Github https://github.comkumaraswins/Coursera-Algorithm-ToolboxRepository from Github https://github.comkumaraswins/Coursera-Algorithm-Toolbox

Coursera Algorithm Toolbox

The basic algorithmic techniques and ideas for computational problems arising frequently in practical applications: sorting and searching, divide and conquer, greedy algorithms, dynamic programming.

Maximum Pairwise Product

Given the array find the 2 maximum number in an array and get the product of the array

Output

JS - Max time used: 0.06/5.00, max memory used: 34283520/536870912.

Python - Max time used: 0.10/5.00, max memory used: 26763264/536870912.


Extras

To find the min and max of 2 numbers

max(a,b) => a  if a >= b else b
Python difference between / & //
Python 3, they made the / operator do a floating-point division, and added the // operator to do integer division (i.e. quotient without remainder); whereas in Python 2, the / operator was simply integer division, unless one of the operands was already a floating point number.

About

The course covers basic algorithmic techniques and ideas for computational problems arising frequently in practical applications: sorting and searching, divide and conquer, greedy algorithms, dynamic programming. We will learn a lot of theory: how to sort data and how it helps for searching; how to break a large problem into pieces and solve them recursively; when it makes sense to proceed greedily; how dynamic programming is used in genomic studies. You will practice solving computational problems, designing new algorithms, and implementing solutions efficiently (so that they run in less than a second).


Languages

Language:JavaScript 51.0%Language:Python 49.0%