Largest Product in a Grid — Project Euler (Problem 11)

I started solving Project Euler problems this month. Check out the Project Euler tab of this blog for a list of the problems I’ve solved (with solutions) till date. Here’s a problem you might find interesting:

ProjectEuler11

Here’s my solution using Python (I basically search through the entire matrix which is of O() complexity):

I first copy the maxtrix into a text file euler11.txt so that it can be later read into Python

I then execute the following code from the same working directory as euler11.txt

Answer: 70600674

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s